+ Reply to Thread
Results 1 to 5 of 5

Is it an If statement?

  1. #1
    Steve
    Guest

    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. #2
    tjtjjtjt
    Guest

    RE: Is it an If statement?

    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. #3
    Aladin Akyurek
    Guest

    Re: Is it an If statement?

    =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. #4
    Ron Rosenfeld
    Guest

    Re: Is it an If statement?

    On Sun, 9 Jan 2005 08:49:02 -0800, "Steve" <[email protected]>
    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. #5
    Arvi Laanemets
    Guest

    Re: Is it an If statement?

    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" <[email protected]> wrote in message
    news:[email protected]...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1