Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
detect column name of last populated data
i need to detect column name showing msgbox of last used range column -- ilyaskaz ----------------------------------------------------------------------- ilyaskazi's Profile: http://www.excelforum.com/member.php...fo&userid=2396 View this thread: http://www.excelforum.com/showthread.php?threadid=38980 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
detect column name of last populated data
Use: Sub LastColumn_Number() num = ActiveSheet.UsedRange.Columns.Count numq = ActiveSheet.UsedRange.Column - 1 MsgBox num + numq End Su -- david ----------------------------------------------------------------------- davidm's Profile: http://www.excelforum.com/member.php...fo&userid=2064 View this thread: http://www.excelforum.com/showthread.php?threadid=38980 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
detect column name of last populated data
Good work. but i need column *NAME* and not NUMBER -- ilyaskaz ----------------------------------------------------------------------- ilyaskazi's Profile: http://www.excelforum.com/member.php...fo&userid=2396 View this thread: http://www.excelforum.com/showthread.php?threadid=38980 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
detect column name of last populated data
ok here is the solution... Code ------------------- Dim a As string Dim num, numq, cn num = ActiveSheet.Usedrange.Columns.count numq = ActiveSheet.Usedrange.Column - 1 cn = num + numq Cells(1, cn).Select a = ActiveCell.Address MsgBox Left(Right(a, Len(a) - 1), InStr(Right(a, Len(a) - 1), "$") - 1 ------------------- thankyou. -- ilyaskaz ----------------------------------------------------------------------- ilyaskazi's Profile: http://www.excelforum.com/member.php...fo&userid=2396 View this thread: http://www.excelforum.com/showthread.php?threadid=38980 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find the first or last populated column in a range | Excel Worksheet Functions | |||
Last populated cell in a column | Excel Discussion (Misc queries) | |||
Last populated cell in a column | Excel Discussion (Misc queries) | |||
Referencing last populated cell in a column | Excel Worksheet Functions | |||
how can I find last populated cell in a row (or column) | Excel Programming |