View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
ShaneDevenshire ShaneDevenshire is offline
external usenet poster
 
Posts: 2,344
Default Identify last non-empty column in a table

Hi,

Well its not quite clear since you say the top column contains all the
months but if it is not empty all the previous columns are complete?

So I'm going to assume that row 2 contains data out to the last column which
is complete. But row 1 contains data (month names) ever further.

=LEFT(ADDRESS(1,MAX((2:2<"")*COLUMN(2:2)),4))

This is array entered - Press Shift+Ctrl+Enter instead of Enter. Also this
formula assumes that row 2 only has data out to the last month, not data way
outside the original data range. If that is the case edit the formula
replacing 2:2 with something like A2:N2 or whatever is appropriate.


If this is helpful, please click the Yes button.
--
Thanks,
Shane Devenshire


"John" wrote:

I have a table of monthly data for 2008. Monthly columns are empty until
month end data is available, except for the top row which contains the month
names Jan thru Dec.

How do I write a function to place the Excel Column Letter in a cell to
identify the monthly column having the most recent data. If the top cell in
a column is non-blank, then that column, and all before will complete.

Hope this description is clear. Thx for your help, John