How Can one use Sumproduct or Sum with IF(VlookUp or Lookup...........)

RapchikM

Board Regular
Joined
Oct 5, 2020
Messages
97
Office Version
  1. 2021
Platform
  1. Windows
Hello

This is in relation with Thread Unable to derive Simple Multiplication result with IF(AND.... Cell Value 0 or Blank

As criteria changed

How Can I use Sumproduct or Sum with IF(VlookUp or Lookup

You can see
The Cell range from D15:F19 is Fixed

From Row 22 onwards Formula will be draged.

So as per the fixed Range From D15:F19 the following is the result
=((13*100*1.65)+(13*200*4.1)+(13*200*7.45)+(13*500*8.25)/100) = 858
=(SUMPRODUCT(C58*IF(E52:E55=0,100,E$52:E55)*F$52:F$55/100)) = 858

What i want here is in G22 = 677.095 because one condition of lookup or vlookup needs to be added

using below Formula
New formula in G22 =
=B22*(SUMPRODUCT(C22*IF(E52:E55=0,100,(LOOKUP(C22,E$33:E$36,E$33:E$36)*(C22-LOOKUP(C22,E$33:E$36,E$33:E$36)*LOOKUP(C22,E$33:E$36,F$33:F$36))))))

I am getting as 4274400 instead of 66709.50 Somewhere i went wrong

The condition is to look for value C22 and on basis of that using SUMPRODUCT OR SUM with IF(Vlookup or Lookup
or How to achieve the following result with Sumproduct or Sum with Vlookup or Lookup and Cells blank or = 0 in the Range From D15:D19

=((13*100*1.65)+(13*200*4.1)+(13*200*7.45)+(13*322*8.25)/100) = 697.095
322=822-500
sumproduct-formula.xlsx
BCDEFG
15No Of UnitsRate Per Unit
160-10001.65
17101-3002004.10
18301-5002007.45
19500 + Above5008.25
20
21
22138224274400
Sheet4
Cell Formulas
RangeFormula
G22G22=$B22*(SUMPRODUCT(C22*IF(E52:E55=0,100,(($C22-LOOKUP($C22,E$33:E$36,E$33:E$36)*LOOKUP(C22,E$33:E$36,F$33:F$36)))/100)))
Press CTRL+SHIFT+ENTER to enter array formulas.



RapchikM
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Jasonb75
If you don't like different values in column E, then the simple fix for that is to keep your values there and use another column to feed the formula.

You were right by adding the column and making the formula simple.

I was trying with complex addition ie with IF Cells in range = 0 or Blank THEN 1..... and without adding the column. But efforts made me come back to your suggestion.

Thanks for your valuable suggestion?

RapchikM
 
Upvote 0
Not exactly sure what your purpose is for the formula but your manual calculations are done on the same principles as income tax bands so I just used a tried and tested method of income tax calculation adjusted to your data.
 
Upvote 0

Forum statistics

Threads
1,223,237
Messages
6,170,924
Members
452,366
Latest member
TePunaBloke

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