Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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
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
Moving left of a cell reference jagbabbra Excel Worksheet Functions 1 June 13th 06 02:11 PM
Need Help With Moving Active Cell zero635[_5_] Excel Programming 2 July 19th 05 02:36 AM
Moving Cell up, down, left or right thru Macros Mustafa S N Excel Programming 5 March 21st 05 01:09 PM
Moving the Active cell to the left of the screen Dave Bash Excel Programming 1 December 17th 03 04:11 PM
Moving active cell Scott Excel Programming 1 July 31st 03 05:52 PM


All times are GMT +1. The time now is 05:32 PM.

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

About Us

"It's about Microsoft Excel"