“If†problem around dates

A

ANDY

I want to enter some data into a cell dependant upon a date range.

If the date in cell “A†is between 1-Dec-06 and 28-Feb-07 return 02-07 into
cell “Bâ€
If the date in cell “A†is between 1-Mar-07 and 31-May-07 return 05-07 into
cell “Bâ€
If the date in cell “A†is between 1-June-07 and 31-Aug-07 return 08-07 into
cell “Bâ€
If the date in cell “A†is between 1-Sep-07 and 30-Nov-07 return 11-07 into
cell “Bâ€
If the date in cell “A†is between 1-Dec-07 and 28-Feb-08 return 02-08 into
cell “Bâ€

Etc - Etc
 
B

bj

try
=DATE(YEAR(A1+31),CHOOSE(MONTH(A1),2,2,5,5,5,8,8,8,11,11,11,2),1)
formatted as mm-yy
 
D

Duke Carey

You need a lookup table

Put the first date for each range, i.e., 12/1/06, 3/1/07,6/1/07, etc into a
column.
In the cells adjacent and to the right of the dates enter the values you
want returned, i.e., 02-07, 05-07, 08-07, etc. Let's say these two columns
of data are in cells A1:B10

Then use this formula

=VLOOKUP(date,$A$1:$B$10,2)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top