Complex IF Function with Different Data Types

sabledragonrook

New Member
Joined
Nov 9, 2015
Messages
7
Hello all! Trying to pull something off here, but I'm not sure if it's possible. Below, 11/8/2015 is A9, 21 is C9, and 23 at the bottom there is C18.

11/8/2015Wordy21
33
11
4.5
4.5
4.5
Max10
300Editors7
11/9/2015Wordy9
23

<tbody>
</tbody>

From 21 down to 7 is one day's values. However, how many cells these values take up each day individually varies from day to day. I would like to create a complex IF function so that if the sum of all values occurring on a single day is >75, it will say "Budget Met" but if it is <75, it will say "Low Yield" in red. I can do all of this myself, except that I don't know how to account for the fact that, for example, on 11/8 there are 8 entries and on 11/9 there are 2. I was hoping there was a SUM function that could do the sum of all numerical values on X day. This is where I get a little lost, because if I'm just going to have to rewrite the IF function for the correct cells every day, I might as well do the math myself.

Help, anybody?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
this solution needs a helper column (D) that can be hidden.


Excel 2012
ABCDE
911/08/2015Wordy2111/08/2015Budget Met
103311/08/2015
111111/08/2015
124.511/08/2015
134.511/08/2015
144.511/08/2015
15Max1011/08/2015
16300Editors711/08/2015
1711/09/2015Wordy911/09/2015Low Yield
182311/09/2015
Sheet2
Cell Formulas
RangeFormula
D9=IF(ISBLANK(A9),D8,A9)
E9=IF(ISBLANK(A9),"",IF(SUMIF(D:D,A9,C:C)>=75,"Budget Met","Low Yield"))
 
Upvote 0
Hi sable

Alan's solution should sort you out, but I wanted to add that in general it's good practice to include the date on every single row, rather than only when it changes - this makes it much easier to write formulas aggregating your data (which is what you are doing here - basically saying sum column C on the basis that the date is suchandsuch). If you look at the helper column D in the solution, each row has the date directly next to the value you are summing in column C.

This also means that if you want to filter your data to look at, let's say, all dates during November 2015, you will see all of the rows rather than just the first row (as the filter will remove the blanks).

Best of luck

Mackers
 
Upvote 0
this solution needs a helper column (D) that can be hidden.

Excel 2012
ABCDE
911/08/2015Wordy2111/08/2015Budget Met
103311/08/2015
111111/08/2015
124.511/08/2015
134.511/08/2015
144.511/08/2015
15Max1011/08/2015
16300Editors711/08/2015
1711/09/2015Wordy911/09/2015Low Yield
182311/09/2015

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet2

Worksheet Formulas
CellFormula
D9=IF(ISBLANK(A9),D8,A9)
E9=IF(ISBLANK(A9),"",IF(SUMIF(D:D,A9,C:C)>=75,"Budget Met","Low Yield"))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
Thanks! It seems to not want to do the D9 formula correctly, though. It displays 42316 instead of the dates, and I'm not entirely sure why. Any ideas?
 
Upvote 0
you need to format column D as dates to display them properly.
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,376
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top