Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
code for col number of last used cell in a row
Hi all,
I knew it once, but I didn't program for a long time: What is the best code to get the column number (number!) of the last non blank cell in a row? TIA Jack Sons The Netherlands |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
code for col number of last used cell in a row
Assuming row 1
LastCol = Cells(1, Columns.Count).End(xlToLeft).Column -- HTH Bob "Jack Sons" wrote in message ... Hi all, I knew it once, but I didn't program for a long time: What is the best code to get the column number (number!) of the last non blank cell in a row? TIA Jack Sons The Netherlands |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
code for col number of last used cell in a row
Dim lCol as Long
lCol=Cells(1,Columns.Count).End(XlToLeft)).Column -- Regards Dave Hawley www.ozgrid.com "Jack Sons" wrote in message ... Hi all, I knew it once, but I didn't program for a long time: What is the best code to get the column number (number!) of the last non blank cell in a row? TIA Jack Sons The Netherlands |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
code for col number of last used cell in a row
Hi
The 1 represents row 1 so change to suit LastCol = Cells(1, Columns.Count).End(xlToLeft).Column -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Jack Sons" wrote: Hi all, I knew it once, but I didn't program for a long time: What is the best code to get the column number (number!) of the last non blank cell in a row? TIA Jack Sons The Netherlands . |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
code for col number of last used cell in a row
Bob, Dave and Mike, thank you all.
Jack. "Jack Sons" schreef in bericht ... Hi all, I knew it once, but I didn't program for a long time: What is the best code to get the column number (number!) of the last non blank cell in a row? TIA Jack Sons The Netherlands |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I automatically add an area code to a number in a cell? | Excel Worksheet Functions | |||
Negative number morphing to a cell code | Excel Worksheet Functions | |||
Convert a Number Code to a Text Code | Excel Discussion (Misc queries) | |||
Can I auto fill a cell in one worksheet by typing a code number | Excel Worksheet Functions | |||
Format the Cell into a telephone number but using country code | Excel Discussion (Misc queries) |