A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

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



 
 
Thread Tools Display Modes
  #1  
Old August 29th, 2005, 09:30 AM
Dave
external usenet poster
 
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  
Old August 29th, 2005, 11:37 AM
Bob Phillips
external usenet poster
 
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  
Old August 29th, 2005, 06:46 PM
Dave 2005
external usenet poster
 
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  
Old August 29th, 2005, 09:09 PM
Bob Phillips
external usenet poster
 
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  
Old August 29th, 2005, 10:30 PM
Dave 2005
external usenet poster
 
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











 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 01:45 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.