Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Dave
 
Posts: n/a
Default Hightlighting Numbers & then all Cells to the right of these Numbers.

Hi

I'm making a macro and need some Help.

How could I Hightlight Numbers and then all the cells to the right of these
numbers, so I can copy to other workbooks

Starting in A1 I need to find down in column A for the number 1
When found highlight all numbers below it, so if 1 to 20, 1 to 26, etc all
would be hightlighted
Then highlight all cells with data to the right of these numbers "as well"
example A200 - N226 then copy to clipboard

Thanks in advance

Dave



  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Dim cell As Range

On Error Resume Next
Set cell = Columns("A:A").Find(1)
On Error GoTo 0
If Not cell Is Nothing Then
cell.Resize(Cells(Rows.Count, "A").End(xlUp).Row - cell.Row + 1,
2).Select
End If


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Dave" wrote in message
...
Hi

I'm making a macro and need some Help.

How could I Hightlight Numbers and then all the cells to the right of

these
numbers, so I can copy to other workbooks

Starting in A1 I need to find down in column A for the number 1
When found highlight all numbers below it, so if 1 to 20, 1 to 26, etc all
would be hightlighted
Then highlight all cells with data to the right of these numbers "as well"
example A200 - N226 then copy to clipboard

Thanks in advance

Dave





  #3   Report Post  
Dave 2005
 
Posts: n/a
Default

Hi Bob

Thanks for the reply

Ran the code

It found 1 to 10 in Column A - which the cells was a7 to a16.
but hightlighted a7 to b61, which I wanted it to hightlight a7 to n16.

any advice

Thanks Dave







"Bob Phillips" wrote in message
...
Dim cell As Range

On Error Resume Next
Set cell = Columns("A:A").Find(1)
On Error GoTo 0
If Not cell Is Nothing Then
cell.Resize(Cells(Rows.Count, "A").End(xlUp).Row - cell.Row + 1,
2).Select
End If


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Dave" wrote in message
...
Hi

I'm making a macro and need some Help.

How could I Hightlight Numbers and then all the cells to the right of

these
numbers, so I can copy to other workbooks

Starting in A1 I need to find down in column A for the number 1
When found highlight all numbers below it, so if 1 to 20, 1 to 26, etc
all
would be hightlighted
Then highlight all cells with data to the right of these numbers "as
well"
example A200 - N226 then copy to clipboard

Thanks in advance

Dave







  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

Few more columns needed

Dim cell As Range

On Error Resume Next
Set cell = Columns("A:A").Find(1)
On Error GoTo 0
If Not cell Is Nothing Then
cell.Resize(Cells(Rows.Count, "A").End(xlUp).Row - _
cell.Row + 1,14).Select
End If

The key is the ,14, 14 for column N

--

RP
(remove nothere from the email address if mailing direct)


"Dave 2005" wrote in message
...
Hi Bob

Thanks for the reply

Ran the code

It found 1 to 10 in Column A - which the cells was a7 to a16.
but hightlighted a7 to b61, which I wanted it to hightlight a7 to n16.

any advice

Thanks Dave







"Bob Phillips" wrote in message
...
Dim cell As Range

On Error Resume Next
Set cell = Columns("A:A").Find(1)
On Error GoTo 0
If Not cell Is Nothing Then
cell.Resize(Cells(Rows.Count, "A").End(xlUp).Row - cell.Row + 1,
2).Select
End If


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Dave" wrote in message
...
Hi

I'm making a macro and need some Help.

How could I Hightlight Numbers and then all the cells to the right of

these
numbers, so I can copy to other workbooks

Starting in A1 I need to find down in column A for the number 1
When found highlight all numbers below it, so if 1 to 20, 1 to 26, etc
all
would be hightlighted
Then highlight all cells with data to the right of these numbers "as
well"
example A200 - N226 then copy to clipboard

Thanks in advance

Dave









  #5   Report Post  
Dave 2005
 
Posts: n/a
Default

Hi Bob

This code when i ran it hightlighted a7 to n61, thats all cells with data in
them below, would like it to select data to the right of cells 1 to 10 which
are in a7 to a16 nothing below these cells

Thanks Bob







"Bob Phillips" wrote in message
...
Few more columns needed

Dim cell As Range

On Error Resume Next
Set cell = Columns("A:A").Find(1)
On Error GoTo 0
If Not cell Is Nothing Then
cell.Resize(Cells(Rows.Count, "A").End(xlUp).Row - _
cell.Row + 1,14).Select
End If

The key is the ,14, 14 for column N

--

RP
(remove nothere from the email address if mailing direct)


"Dave 2005" wrote in message
...
Hi Bob

Thanks for the reply

Ran the code

It found 1 to 10 in Column A - which the cells was a7 to a16.
but hightlighted a7 to b61, which I wanted it to hightlight a7 to n16.

any advice

Thanks Dave







"Bob Phillips" wrote in message
...
Dim cell As Range

On Error Resume Next
Set cell = Columns("A:A").Find(1)
On Error GoTo 0
If Not cell Is Nothing Then
cell.Resize(Cells(Rows.Count, "A").End(xlUp).Row - cell.Row + 1,
2).Select
End If


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Dave" wrote in message
...
Hi

I'm making a macro and need some Help.

How could I Hightlight Numbers and then all the cells to the right of
these
numbers, so I can copy to other workbooks

Starting in A1 I need to find down in column A for the number 1
When found highlight all numbers below it, so if 1 to 20, 1 to 26, etc
all
would be hightlighted
Then highlight all cells with data to the right of these numbers "as
well"
example A200 - N226 then copy to clipboard

Thanks in advance

Dave











Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
requires that merged cells must be identically sized? Catt Excel Discussion (Misc queries) 11 July 3rd 05 01:36 PM
excel is adding cell numbers randomly into other cells amy Excel Worksheet Functions 0 May 13th 05 01:11 AM
update row numbers after different active cells in macros followi. LMIV Excel Discussion (Misc queries) 11 February 16th 05 01:44 AM
Converting negative numbers in a range of cells to zero Dede Excel Discussion (Misc queries) 3 January 14th 05 07:23 PM
combining several individual cells of numbers into one cell Jeanne Excel Worksheet Functions 5 November 24th 04 01:31 PM


All times are GMT +1. The time now is 10:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"