+ Reply to Thread
Results 1 to 5 of 5

help with date formula

  1. #1
    Juco
    Guest

    help with date formula

    if cell D7 = 5 or 6 then cell M7 to show 150
    if cell D7 = 7 or 8 then cell M7 to show 200

    The 5 6 7 8 refer to months ie May/June/July/August
    The 150/200 are £s

    Looking for formula to do the above

    thansk



  2. #2
    Max
    Guest

    Re: help with date formula

    One way

    Assuming inputs in D7 are dates

    Put in M7:

    =IF(D7="","",IF(OR(MONTH(D7)=5,MONTH(D7)=6),150,IF(OR(MONTH(D7)=7,MONTH(D7)=
    8),200,"")))

    Format M7 as currency (£)

    --
    Rgds
    Max
    xl 97
    ---
    GMT+8, 1° 22' N 103° 45' E
    xdemechanik <at>yahoo<dot>com
    ----
    Juco <[email protected]> wrote in message
    news:[email protected]...
    > if cell D7 = 5 or 6 then cell M7 to show 150
    > if cell D7 = 7 or 8 then cell M7 to show 200
    >
    > The 5 6 7 8 refer to months ie May/June/July/August
    > The 150/200 are £s
    >
    > Looking for formula to do the above
    >
    > thansk
    >
    >




  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451
    If the value in D7 is not a date but just a number then:

    In M7 type: =IF(OR(D7=5,D7=6),150,IF(OR(D7=7,D7=8),200,""))

    If you have various amounts for different months you might want to consider using the CHOOSE() function instead.

  4. #4
    Arvi Laanemets
    Guest

    Re: help with date formula

    Hi

    =CHOOSE(MATCH(D7,{0;5;7;9},1),"",150,200,"")

    Arvi Laanemets


    "Juco" <[email protected]> wrote in message
    news:[email protected]...
    > if cell D7 = 5 or 6 then cell M7 to show 150
    > if cell D7 = 7 or 8 then cell M7 to show 200
    >
    > The 5 6 7 8 refer to months ie May/June/July/August
    > The 150/200 are £s
    >
    > Looking for formula to do the above
    >
    > thansk
    >
    >




  5. #5
    Juco
    Guest

    Re: help with date formula

    thanks Arvi

    that worked.

    Juco

    "Arvi Laanemets" <[email protected]> wrote in message
    news:%23BD%[email protected]...
    > Hi
    >
    > =CHOOSE(MATCH(D7,{0;5;7;9},1),"",150,200,"")
    >
    > Arvi Laanemets
    >
    >
    > "Juco" <[email protected]> wrote in message
    > news:[email protected]...
    > > if cell D7 = 5 or 6 then cell M7 to show 150
    > > if cell D7 = 7 or 8 then cell M7 to show 200
    > >
    > > The 5 6 7 8 refer to months ie May/June/July/August
    > > The 150/200 are £s
    > >
    > > Looking for formula to do the above
    > >
    > > thansk
    > >
    > >

    >
    >




+ 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