ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Determine which column to use by date (https://www.excelbanter.com/excel-worksheet-functions/74499-determine-column-use-date.html)

Mike Griffin

Determine which column to use by date
 
I have a range of 14 rows by 12 columns. Each column represents a
different month. How can I determine which column to use, if I only
want to use the column for the current month?


Gary''s Student

Determine which column to use by date
 
lets say cols A-L are Jan thru Dec

=MONTH(TODAY()) formatted as an integer will tell you which column to use
for the current date.
--
Gary's Student


"Mike Griffin" wrote:

I have a range of 14 rows by 12 columns. Each column represents a
different month. How can I determine which column to use, if I only
want to use the column for the current month?



Pete_UK

Determine which column to use by date
 
The function TODAY() will give today's date. With the MONTH( ) function
wrapped around this, you will get the month (eg 3 for March), so you
will need to add something to this to suit your range. Say for example
your range starts in column F for January (i.e. the 6th column), then
this formula:

=MONTH(TODAY())+5

would give the column number. If you want this as a letter, then this
amendment:

=CHAR(64+MONTH(TODAY())+5)

would suffice.

Hope this helps.

Pete


Mike Griffin

Determine which column to use by date
 
Yes, that gets me the column!

Now, my question is how to use that column letter or number in another
formula concatenated with the row number.

eg. =IF($(CHAR(64+MONTH(TODAY())+5)$3='NO', blah, blah))

I hope that makes sense


Mike Griffin

Determine which column to use by date
 
I actually figured it out.

=ADDRESS(3, MONTH(TODAY())+8, 3)

Thanks


Pete_UK

Determine which column to use by date
 
Glad you got it working, Mike. Thanks for feeding back.

Pete



All times are GMT +1. The time now is 02:46 PM.

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