If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
substracting numbers in non contigous cells | Guillermo Padrón | General Discussion | 5 | April 10th, 2005 01:29 PM |
hHow do a count the amount of numbers in a cells greater that a c. | patrick | New Users | 2 | December 6th, 2004 09:44 PM |
Average Cells with actuall numbers | Bradley | General Discussion | 4 | June 22nd, 2004 07:39 PM |
Adding numbers continously in multiple cells | KMF | Worksheet Functions | 1 | February 13th, 2004 08:53 PM |
count cells that fall within a range of numbers | Dan E | Worksheet Functions | 1 | November 18th, 2003 05:04 PM |