Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to know the right most column?
Dear all,
I would like to know how to get the right most column number whose cell has a value in a row. Can anyone suggest how to do it programatically? Thanks a lot. Ivan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to know the right most column?
Ivan,
This post shows bottom row and right most column... http://makeashorterlink.com/?Z53732E0C Jim Cone San Francisco, USA "Ivan" wrote in message Dear all, I would like to know how to get the right most column number whose cell has a value in a row. Can anyone suggest how to do it programatically? Thanks a lot. Ivan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to know the right most column?
Hi Ivan,
For a specific row, try LastColInRow = Cells(1, Columns.Count).End(xlToLeft).Column MsgBox LastInCol Replace 1 with the required row number. --- Regards, Norman "Ivan" wrote in message ... Dear all, I would like to know how to get the right most column number whose cell has a value in a row. Can anyone suggest how to do it programatically? Thanks a lot. Ivan |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to know the right most column?
Hi Ivan,
Try: With ActiveSheet.UsedRange MsgBox .Column + .Columns.Count - 1 End With HTH -- David "Ivan" wrote: Dear all, I would like to know how to get the right most column number whose cell has a value in a row. Can anyone suggest how to do it programatically? Thanks a lot. Ivan |
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) | |||
formula : =(column A)+(column B)-(column C). Why won't it work? | Excel Discussion (Misc queries) |