ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Last used column. (https://www.excelbanter.com/excel-discussion-misc-queries/57245-last-used-column.html)

Andrew Mackenzie

Last used column.
 
Is there a way that I can make a cell reference the last occupied cell in a
row. I guess I could use =IF but there are too many columns to use nested
"IF"s.



Bob Phillips

Last used column.
 
This will get the column number

=MAX(IF(ISBLANK(1:1),0,COLUMN(1:1)))

it is an array formula, so commit with Ctrl-Shift-Enter.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Andrew Mackenzie" wrote in message
...
Is there a way that I can make a cell reference the last occupied cell in

a
row. I guess I could use =IF but there are too many columns to use nested
"IF"s.






All times are GMT +1. The time now is 09:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com