Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike Griffin
 
Posts: n/a
Default 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?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default 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?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK
 
Posts: n/a
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike Griffin
 
Posts: n/a
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike Griffin
 
Posts: n/a
Default Determine which column to use by date

I actually figured it out.

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

Thanks



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK
 
Posts: n/a
Default Determine which column to use by date

Glad you got it working, Mike. Thanks for feeding back.

Pete

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP: Comparison IF statement R Weeden Excel Worksheet Functions 6 February 6th 06 08:55 PM
run a macro in a locked cell Ray Excel Discussion (Misc queries) 8 January 10th 06 12:02 AM
Positioning Numeric Values Resulting from 6 Column Array Formula Sam via OfficeKB.com Excel Worksheet Functions 2 January 5th 06 02:03 AM
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM
Count cells based on date range in another column [email protected] New Users to Excel 1 May 5th 05 08:11 PM


All times are GMT +1. The time now is 11:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"