+ Reply to Thread
Results 1 to 5 of 5

If Statements...

  1. #1
    Registered User
    Join Date
    06-09-2005
    Posts
    16

    If Statements...

    I have this if statement:

    =if(sum(e6=20040101:20040331),"1",if(sum(e6=20040401:20040630),"2",if(sum(e6=20040701:20040930),"3",if(sum(e6=20041001:20041231),"4","not this year"))))

    I am not quite a beginner, but I'm not an expert either. You can probably guess what I am trying to do..but if not, here's what I'm trying to accomplish.

    If the sum of e6 equals any number from 20040101 to 20040331 then produce a 1 in the cell, if not, blah blah..you get it.

    What am I missing?

    Thanks!

  2. #2
    Registered User
    Join Date
    12-22-2003
    Location
    Texas
    Posts
    90
    It looks like you are trying to evaluate the annual quarter of a cell date if it is during the year of 2004. Try this formula.

    =IF(YEAR(E6)<>2004,"not",ROUNDUP(MONTH(E6)/3,0))
    Barrfly

  3. #3
    Registered User
    Join Date
    06-09-2005
    Posts
    16
    Not exactly. I have a report that gives me the date but kind of inverted...20041102
    would be November 2nd 2004. I am trying to produce the quarter that the month is in..ex: November is 4th qtr. So the cell I am working off of contains the numbers in the above format.

    I tried the formula given gave me the #num error..

  4. #4
    Registered User
    Join Date
    12-22-2003
    Location
    Texas
    Posts
    90
    try this

    =IF(LEFT(E6,4)<>"2004","not",ROUNDUP(MID(E6,5,2)/3,0))

    the yyyymmdd format is just not the way excel sees dates. This solution should work. Let me know if this works out!
    Last edited by barrfly; 08-01-2005 at 05:19 PM.

  5. #5
    Registered User
    Join Date
    06-09-2005
    Posts
    16

    Talking Thank You

    You did it again...You GENIUS!!

+ 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