Hi,
What the easiest way of looping though the values in a column in a macro?
How to you "call" the cells in the macro?
Br
Andy
Hi,
What the easiest way of looping though the values in a column in a macro?
How to you "call" the cells in the macro?
Br
Andy
Last edited by 77anders; 02-05-2009 at 01:55 PM.
U can reference a cell in macros using Cells( row_numner , col_number)
There are several way to loop thro column.. suppose u want to loop thro column A
First cell of column A is cells(1,1)
![]()
Please Login or Register to view this content.
Shijesh Kumar
http://shijesh.wordpress.com/
thanks alot.
I don't really understand how to specify a certain workbook/sheet in the vba.
Do you know how to?
U can specify any worksheet in workbook by
Sheet1.cells(1,1) -- it will refrence cell A1 ( row 1 col 1) of sheet1
sheet2.cell(100,3) -- it will refere to cell C100 ( row 100 , col 3) of sheet3
Workbooks("BOOK1").Activate --- This is used to refer to a workbook...
Here's an example to loop through sheets. Use a select case or if statement for a specfic sheet
![]()
Please Login or Register to view this content.
http://www.mvps.org/dmcritchie/excel/sheets.htm![]()
Please Login or Register to view this content.
VBA Noob
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks