Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
last column of a row
I would like to know the last filled column of a row. I wrote this lastCol =
cells(1, columns.count) that returns 256. But I have only 101 columns filled with data. So I was expecting lastCol is equal to 101. I am doing something wrong to find last filled column number. Can you please help me? Nazrul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
last column of a row
how about
cells(1, columns.count).end(xltoleft).column -- Don Guillett SalesAid Software "Nazrul" wrote in message ... I would like to know the last filled column of a row. I wrote this lastCol = cells(1, columns.count) that returns 256. But I have only 101 columns filled with data. So I was expecting lastCol is equal to 101. I am doing something wrong to find last filled column number. Can you please help me? Nazrul |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
last column of a row
Try this
MsgBox Cells(ActiveCell.Row, "IV").End(xlToLeft).Column -- Regards Ron de Bruin http://www.rondebruin.nl "Nazrul" wrote in message ... I would like to know the last filled column of a row. I wrote this lastCol = cells(1, columns.count) that returns 256. But I have only 101 columns filled with data. So I was expecting lastCol is equal to 101. I am doing something wrong to find last filled column number. Can you please help me? Nazrul |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
last column of a row
It works. Thanks Don.
"Don Guillett" wrote: how about cells(1, columns.count).end(xltoleft).column -- Don Guillett SalesAid Software "Nazrul" wrote in message ... I would like to know the last filled column of a row. I wrote this lastCol = cells(1, columns.count) that returns 256. But I have only 101 columns filled with data. So I was expecting lastCol is equal to 101. I am doing something wrong to find last filled column number. Can you please help me? Nazrul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
divide column(x) by column(y) to give column(x/y) in excel? | New Users to Excel | |||
Referencing date column A & time column B to get info from column | Excel Discussion (Misc queries) | |||
Return text in Column A if Column B and Column K match | Excel Worksheet Functions | |||
Based on a condition in one column, search for a year in another column, and display data from another column in the same row look | Excel Discussion (Misc queries) | |||
what formula do i put for column m = column k minus column l in e. | Excel Discussion (Misc queries) |