Hightlighting Numbers & then all Cells to the right of these Numbers.

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

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
 
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)
 
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top