Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Traversing the collumn of the active cell
Hi:
I need to traverse the collums of the active cell looking for data, can I use: ActiveCell.Collumn.cells in a foreeach loop? Any help apreciated. Sean. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Traversing the collumn of the active cell
LastCol = cellls(activecell.row,columns.count).end(xltoleft) .column For ColCount = 1 to Lastcol Data = .cells(Activecell.row,ColCount) if Data = "ABC" then 'enter your code here end if next ColCount "Sean Farrow" wrote: Hi: I need to traverse the collums of the active cell looking for data, can I use: ActiveCell.Collumn.cells in a foreeach loop? Any help apreciated. Sean. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Traversing the collumn of the active cell
Hi
Try this: For Each cell In Columns(ActiveCell.Column).Cells a = a + 1 Next Debug.Print a Regards, Per "Sean Farrow" skrev i meddelelsen ... Hi: I need to traverse the collums of the active cell looking for data, can I use: ActiveCell.Collumn.cells in a foreeach loop? Any help apreciated. Sean. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Traversing the collumn of the active cell
Hi:
What does the line: LastCol = cellls(activecell.row,columns.count).end(xltoleft) .column Achieve? Cheers Sean. "Joel" wrote in message ... LastCol = cellls(activecell.row,columns.count).end(xltoleft) .column For ColCount = 1 to Lastcol Data = .cells(Activecell.row,ColCount) if Data = "ABC" then 'enter your code here end if next ColCount "Sean Farrow" wrote: Hi: I need to traverse the collums of the active cell looking for data, can I use: ActiveCell.Collumn.cells in a foreeach loop? Any help apreciated. Sean. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Traversing the collumn of the active cell
There should only be two ll (not 3). The line gets the last cell with data
in the column. cells.count is a constant in excel that represents the last column on the worksheet like in excel 2003 which is column 256. end(xltoleft) move from column 256 to the left until a cell with data is found. You didn't specify how many columns you needed to transverse. "Sean Farrow" wrote: Hi: What does the line: LastCol = cellls(activecell.row,columns.count).end(xltoleft) .column Achieve? Cheers Sean. "Joel" wrote in message ... LastCol = cellls(activecell.row,columns.count).end(xltoleft) .column For ColCount = 1 to Lastcol Data = .cells(Activecell.row,ColCount) if Data = "ABC" then 'enter your code here end if next ColCount "Sean Farrow" wrote: Hi: I need to traverse the collums of the active cell looking for data, can I use: ActiveCell.Collumn.cells in a foreeach loop? Any help apreciated. Sean. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Traversing the collumn of the active cell
Chers Both, I'#ve solved this.
Sean. "Per Jessen" wrote in message ... Hi Try this: For Each cell In Columns(ActiveCell.Column).Cells a = a + 1 Next Debug.Print a Regards, Per "Sean Farrow" skrev i meddelelsen ... Hi: I need to traverse the collums of the active cell looking for data, can I use: ActiveCell.Collumn.cells in a foreeach loop? Any help apreciated. Sean. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
counting if data from one collumn is present in another collumn | Excel Worksheet Functions | |||
replace the letters (for collumn) & numbers(row no.) of cell reference only | Excel Programming | |||
Delete all of collumn after cell... | Excel Programming | |||
traversing across columns in VBA | Excel Programming | |||
Traversing Rows | Excel Programming |