Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 414
Default €œIf€ problem around dates

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

--
Cheers

Andy
  #2   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default €œIf€ problem around dates

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

"ANDY" wrote:

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

--
Cheers

Andy

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,081
Default €œIf€ problem around dates

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)


"ANDY" wrote:

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

--
Cheers

Andy

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
Problem with dates Carpe Diem Excel Worksheet Functions 2 September 11th 07 12:21 PM
Problem with dates Andibevan Excel Discussion (Misc queries) 1 December 1st 05 01:24 PM
Problem Dates Andy Cohen Excel Discussion (Misc queries) 1 September 16th 05 01:29 AM
Formatting cells Auto fill color using €œIf€ Masatami Excel Worksheet Functions 4 January 13th 05 01:39 AM
Problem with dates Emece Excel Worksheet Functions 7 December 22nd 04 06:47 PM


All times are GMT +1. The time now is 01:15 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"