Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Moving left/right from active cell
I have a piece of code that I am using to find the first blank cell in a
range. I want to be able to then go over a specific number of columns from that blank cell to paste a formula in it. Is there a macro that I can use to do that? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Moving left/right from active cell
Without any code posted I will just assume that you are using the active
cell. If that is the case then Activecell.offset(0, 2) 'two columns to the right... if you are using range objects then you can just offset your range object in a similar manner with a set statement... -- HTH... Jim Thomlinson "Kurt Barr" wrote: I have a piece of code that I am using to find the first blank cell in a range. I want to be able to then go over a specific number of columns from that blank cell to paste a formula in it. Is there a macro that I can use to do that? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Moving left/right from active cell
You can use the Offset property of the Range object. E.g.,
Dim Rng As Range Dim Rng2 As Range Set Rng = Range("A1") ' or whatever Set Rng2 = Rng.Offset(0,3) ' 3 cols to the right -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Kurt Barr" <Kurt wrote in message ... I have a piece of code that I am using to find the first blank cell in a range. I want to be able to then go over a specific number of columns from that blank cell to paste a formula in it. Is there a macro that I can use to do that? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Moving left/right from active cell
That worked perfectly. Thank you very much!
"Jim Thomlinson" wrote: Without any code posted I will just assume that you are using the active cell. If that is the case then Activecell.offset(0, 2) 'two columns to the right... if you are using range objects then you can just offset your range object in a similar manner with a set statement... -- HTH... Jim Thomlinson "Kurt Barr" wrote: I have a piece of code that I am using to find the first blank cell in a range. I want to be able to then go over a specific number of columns from that blank cell to paste a formula in it. Is there a macro that I can use to do that? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Moving left of a cell reference | Excel Worksheet Functions | |||
Need Help With Moving Active Cell | Excel Programming | |||
Moving Cell up, down, left or right thru Macros | Excel Programming | |||
Moving the Active cell to the left of the screen | Excel Programming | |||
Moving active cell | Excel Programming |