Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Custermd
 
Posts: n/a
Default compare date to column data


I need help.

on one worksheet i have a row with the months of the year . I am trying
to compare the current date with these columns to see which column the
current date would relate to.

------a---b---c----d----e----f----g---h----i----j
01) jul--aug-sep--oct-nov--dec-jan--feb-mar-apr

If the current date is 21feb06 the the column would relate to column
(i)

thus the equations on another ws would relate to data in column i


If the current date is 15apr06 the the column would relate to column
(k)

thus the equations on another ws would relate to data in column (k)

Thankyou


--
Custermd
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vezerid
 
Posts: n/a
Default compare date to column data

The following formula assumes that your months are in A1:K1. From what
I see you want to match a Feb date to March. Assuming your date is in
cell A4, then the following formula will give you the relative position
of the appropriate month in A1:K1:

=MATCH(DATE(YEAR(A4),MONTH(A4)+1,1),DATEVALUE("1 "&A1:K1&"
"&YEAR(A4)-2000),0)

This is an *array* formula, it must be entered with Shift+Ctrl+Enter.

For a value of 21feb06 in A4 this formula will give you the number 9,
which is the relative column number of mar in your range.

I don;t know what else you want to do but this might be a start.

HTH
Kostis Vezerides

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
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
creating a date column from seperate data T.O. Excel Worksheet Functions 3 December 20th 05 01:22 PM
how to put data in the column A to the next row of the column B jims Excel Discussion (Misc queries) 1 August 5th 05 12:44 AM
How do I compare 2 sets of data and highlight differences? Perplexed1 Excel Worksheet Functions 1 July 9th 05 01:15 AM
Sort pages? David Excel Discussion (Misc queries) 15 May 13th 05 11:33 PM


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

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

About Us

"It's about Microsoft Excel"