#1   Report Post  
Delaina
 
Posts: n/a
Default If Statements...


I have this if statement:

=if(sum(e6=20040101:20040331),"1",if(sum(e6=200404 01: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!


--
Delaina
------------------------------------------------------------------------
Delaina's Profile: http://www.excelforum.com/member.php...o&userid=24151
View this thread: http://www.excelforum.com/showthread...hreadid=391959

  #2   Report Post  
barrfly
 
Posts: n/a
Default


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

Excel User - Energy markets
------------------------------------------------------------------------
barrfly's Profile: http://www.excelforum.com/member.php...fo&userid=4141
View this thread: http://www.excelforum.com/showthread...hreadid=391959

  #3   Report Post  
Delaina
 
Posts: n/a
Default


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..


--
Delaina
------------------------------------------------------------------------
Delaina's Profile: http://www.excelforum.com/member.php...o&userid=24151
View this thread: http://www.excelforum.com/showthread...hreadid=391959

  #4   Report Post  
barrfly
 
Posts: n/a
Default


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!


--
barrfly

Excel User - Energy markets
------------------------------------------------------------------------
barrfly's Profile: http://www.excelforum.com/member.php...fo&userid=4141
View this thread: http://www.excelforum.com/showthread...hreadid=391959

  #5   Report Post  
Delaina
 
Posts: n/a
Default


You did it again...You GENIUS!!


--
Delaina
------------------------------------------------------------------------
Delaina's Profile: http://www.excelforum.com/member.php...o&userid=24151
View this thread: http://www.excelforum.com/showthread...hreadid=391959

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
Better Way to Code IF Statements? TheRobsterUK Excel Discussion (Misc queries) 4 July 18th 05 03:37 PM
How to: Multiple "if" statements? Hosh New Users to Excel 2 June 29th 05 02:20 PM
Logical ELSE statements Ruth Excel Discussion (Misc queries) 2 June 23rd 05 03:23 PM
Nested IF statements John Simons Excel Worksheet Functions 14 February 16th 05 06:17 AM
If statements Mark Excel Worksheet Functions 3 November 2nd 04 08:39 PM


All times are GMT +1. The time now is 03:10 PM.

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"