Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Steve
 
Posts: n/a
Default Is it an If statement?

if cell B8 has a date entered between the dates 12/01/04 and 12/07/04 I
would like a value of 1 entered in cell A8.
if cell B8 has a date entered between the dates 12/08/04 and 12/14/04 I
would like a value of 2 entered in cell A8.
if cell B8 has a date entered between the dates 12/15/04 and 12/21/04 I
would like a value of 3 entered in cell A8.
if cell B8 has a date entered between the dates 12/22/04 and 12/28/04 I
would like a value of 4 entered in cell A8.
Can anyone help?

Thanks in advance for your time,
Steve
  #2   Report Post  
tjtjjtjt
 
Posts: n/a
Default

You could do this with IF, but you're better off with VLOOKUP. For more
information:
http://www.contextures.com/xlFunctions02.html

tj

"Steve" wrote:

if cell B8 has a date entered between the dates 12/01/04 and 12/07/04 I
would like a value of 1 entered in cell A8.
if cell B8 has a date entered between the dates 12/08/04 and 12/14/04 I
would like a value of 2 entered in cell A8.
if cell B8 has a date entered between the dates 12/15/04 and 12/21/04 I
would like a value of 3 entered in cell A8.
if cell B8 has a date entered between the dates 12/22/04 and 12/28/04 I
would like a value of 4 entered in cell A8.
Can anyone help?

Thanks in advance for your time,
Steve

  #3   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

=LOOKUP(B8,{0;38322;38329;38336;38343;38350},{"";1 ;2;3;4;""})

Steve wrote:
if cell B8 has a date entered between the dates 12/01/04 and 12/07/04 I
would like a value of 1 entered in cell A8.
if cell B8 has a date entered between the dates 12/08/04 and 12/14/04 I
would like a value of 2 entered in cell A8.
if cell B8 has a date entered between the dates 12/15/04 and 12/21/04 I
would like a value of 3 entered in cell A8.
if cell B8 has a date entered between the dates 12/22/04 and 12/28/04 I
would like a value of 4 entered in cell A8.
Can anyone help?

Thanks in advance for your time,
Steve

  #4   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Sun, 9 Jan 2005 08:49:02 -0800, "Steve"
wrote:

if cell B8 has a date entered between the dates 12/01/04 and 12/07/04 I
would like a value of 1 entered in cell A8.
if cell B8 has a date entered between the dates 12/08/04 and 12/14/04 I
would like a value of 2 entered in cell A8.
if cell B8 has a date entered between the dates 12/15/04 and 12/21/04 I
would like a value of 3 entered in cell A8.
if cell B8 has a date entered between the dates 12/22/04 and 12/28/04 I
would like a value of 4 entered in cell A8.
Can anyone help?

Thanks in advance for your time,
Steve


You don't specify what you want to happen if the date in B8 is not within the
stated range.

Assuming you are using some method (data validation?) to assure the value is
within the stated range, then another method:

B8: =INT((B8-4)/7)-5473

If you require specifics for validating the entry, post back.


--ron
  #5   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi

Another solution
=MATCH(B8,{38322;38329;38336;38343;38350},1)
(returns #N/A when the date is less than 12/01/04 and 5 when the date is
past 12/28/04)
or
=MATCH(B8,{0;38322;38329;38336;38343;38350},1)-1
(which returns 0 when the date is less than 12/01/04 and 5 when the date is
past 12/28/04)


Arvi Laanemets


"Steve" wrote in message
...
if cell B8 has a date entered between the dates 12/01/04 and 12/07/04 I
would like a value of 1 entered in cell A8.
if cell B8 has a date entered between the dates 12/08/04 and 12/14/04 I
would like a value of 2 entered in cell A8.
if cell B8 has a date entered between the dates 12/15/04 and 12/21/04 I
would like a value of 3 entered in cell A8.
if cell B8 has a date entered between the dates 12/22/04 and 12/28/04 I
would like a value of 4 entered in cell A8.
Can anyone help?

Thanks in advance for your time,
Steve



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
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM
Statement lintan Excel Worksheet Functions 1 December 2nd 04 11:31 PM
Duplicate fields does not match up! If statement Patsy Excel Worksheet Functions 0 November 11th 04 12:16 AM
If statement needed Patsy Excel Worksheet Functions 1 November 4th 04 03:48 PM
IF Statement difficulty susan hayes Excel Worksheet Functions 3 November 2nd 04 09:46 PM


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