SumProduct Round IF

1FJef

New Member
Joined
Aug 4, 2011
Messages
6
Greetings! I've boldened the portion of my formula in question, below. The columns [Unit Value] and [Mean] primarily contain numbers with 8 decimal places. My First Formula works well - it basically looks for each instant where the data in column Unit Value equals or exceeds the data in column Mean. However, I needed for the comparison to be based only on the rounding of each number to 2 decimal places. Thus, I created the Second Formula.
=IF(Y$11="","",SUMPRODUCT(--(Table2[Unit Value]>=Table2[Mean]),--(Table2[Measure]='HM_Teaching MEAN'!Y$11),--(Table2[Year]='HM_Teaching MEAN'!$B$7),--(Table2[Indicator]=LOOKUP("zzz",$C$10:Y$10)),Table2[Unit Participation Lookup]))
  • Added ROUND Function: SUMPRODUCT(--(ROUND(Table2[Unit Value],2)>=ROUND(Table2[Mean],2))

Here is my problem. Both the Unit Value and Mean columns also contain text. This text is erring out because the ROUND function cannot round text.
  • Question: Where can I insert an IF function in my formula to tell the formula to only try to round the values in these columns where those values are not text?

I should note, for other calculations, I cannot remove the text fields from the columns; I have to find a way to ignore them. Thanks!
 
Joeu2004 and Aladin - can't tell you how appreciative I am. Ended up using the 2nd formula you provided, Joeu, which you shared would be more efficient. Works perfectly - thanks a ton!
 
Upvote 0

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
I don't think the suggestion I made is inefficient or less efficient at all.

I concur to the extent that any difference probably is not noticeable. I think the more significant issue is the handling of "numeric" text and whether or not it makes a difference to the user.
 
Upvote 0

Forum statistics

Threads
1,216,117
Messages
6,128,937
Members
449,480
Latest member
yesitisasport

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