ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If Statements... (https://www.excelbanter.com/excel-discussion-misc-queries/38133-if-statements.html)

Delaina

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


barrfly


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


Delaina


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


barrfly


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


Delaina


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



All times are GMT +1. The time now is 08:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com