Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Looping through columns

Hi

Want to use the isEmpty function to examine cells dependent on column
(e.g. B1, C1, D1)

If B1 has data in it then insert data into C1 etc. Doing this with
rows is easy by substituting the row number with a variable (x) so

range("sheet1!a & x")

How do I substitute the column reference? Do i need to use R1C1
referencing?

Thanks

Mick

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 419
Default Looping through columns

Mick,

You can use Cellls(RowNbr,ColumnNbr) in place of Range(). So...

Cells(1,1) is A1
Cells(1,2) is B1
Cells(2,1) is A2

....then substitute variables for both rows and columns. Maybe something
like "plngRow" and "plngColumn":

Cells(plngRow,plngColumn)

HTH,

Conan




"Mick" wrote in message
...
Hi

Want to use the isEmpty function to examine cells dependent on column
(e.g. B1, C1, D1)

If B1 has data in it then insert data into C1 etc. Doing this with
rows is easy by substituting the row number with a variable (x) so

range("sheet1!a & x")

How do I substitute the column reference? Do i need to use R1C1
referencing?

Thanks

Mick



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
Looping through Columns then Rows JCP Excel Programming 3 October 30th 05 04:27 AM
Looping thru columns Robert Excel Programming 5 June 15th 05 09:48 AM
Looping through columns teresa Excel Programming 2 December 31st 04 07:25 PM
Looping thru columns beyond Z John Pierce Excel Programming 3 January 23rd 04 12:17 AM
Looping question for 2 columns [email protected] Excel Programming 1 October 24th 03 02:33 PM


All times are GMT +1. The time now is 03:21 AM.

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

About Us

"It's about Microsoft Excel"