Formula not working

rameshppc

Board Regular
Joined
Jun 10, 2017
Messages
114
Office Version
  1. 2013
Platform
  1. Windows
Hi I am using below formula in a cell,

F4 =(IF(AND(B4="MONEY TRANSFER",E4="1"),SUMIFS($R$4:$R$8,$P$4:$P$8,"<="&D4,$Q$4:$Q$8,">="&D4),IF(AND(B4="MONEY TRANSFER",E4="11"),SUMIFS($R$4:$R$8,$P$4:$P$8,"<="&D4,$Q$4:$Q$8,">="&D4)+3.5,IF(AND(B4="MONEY TRANSFER",E4="10"),SUMIFS($N$4:$N$28,$L$4:$L$28,"<="&D4,$M$4:$M$28,">="&D4)+3.5,IF(AND(B4="MONEY TRANSFER",E4=""),SUMIFS($N$4:$N$28,$L$4:$L$28,"<="&D4,$M$4:$M$28,">="&D4),"0"))

(VALUE EXPECTED FROM THE SUM RANGE $N$4:$N$28)

But result shows "0"

B4 = MONEY TRANSFER
E4 = 10

I don't know where i did the wrong.

Also pls help me is it possible to simplify...
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Re: Formula not working / posiible to simplify

Don't put the numeric values in quotes

=IF(B4="MONEY TRANSFER",
IF(E4=1,SUMIFS($R$4:$R$8,$P$4:$P$8,"<="&D4,$Q$4:$Q$8,">="&D4),
IF(E4=11,SUMIFS($R$4:$R$8,$P$4:$P$8,"<="&D4,$Q$4:$Q$8,">="&D4)+3.5,
IF(E4=10,SUMIFS($N$4:$N$28,$L$4:$L$28,"<="&D4,$M$4:$M$28,">="&D4)+3.5,
IF(E4="",SUMIFS($N$4:$N$28,$L$4:$L$28,"<="&D4,$M$4:$M$28,">="&D4),0)))),0)
 
Upvote 0
Re: Formula not working / posiible to simplify

Just to add up to AlphaFrog's solution, one possible simplification is to combine CHOOSE & MATCH functions. The ultimate goal is to create the following structure:

=IFERROR(IF(B4="MONEY TRANSFER",CHOOSE(MATCH(E4,{1,11,10,0},0),"sumifs E4=1","sumifs E4=11","sumifs E4=10","sumifs E4 is empty"),""),"")

When replaced with your SUMIFS functions, the final formula will look like that:
Code:
=IFERROR(IF(B4="MONEY TRANSFER",CHOOSE(MATCH(E4,{1,11,10,0},0),SUMIFS($R$4:$R$8,$P$4:$P$8,"<="&D4,$Q$4:$Q$8,">="&D4),SUMIFS($R$4:$R$8,$P$4:$P$8,"<="&D4,$Q$4:$Q$8,">="&D4)+3.5,SUMIFS($N$4:$N$28,$L$4:$L$28,"<="&D4,$M$4:$M$28,">="&D4)+3.5,SUMIFS($N$4:$N$28,$L$4:$L$28,"<="&D4,$M$4:$M$28,">="&D4)),""),"")
 
Upvote 0
Re: Formula not working / posiible to simplify

Don't put the numeric values in quotes

=IF(B4="MONEY TRANSFER",
IF(E4=1,SUMIFS($R$4:$R$8,$P$4:$P$8,"<="&D4,$Q$4:$Q$8,">="&D4),
IF(E4=11,SUMIFS($R$4:$R$8,$P$4:$P$8,"<="&D4,$Q$4:$Q$8,">="&D4)+3.5,
IF(E4=10,SUMIFS($N$4:$N$28,$L$4:$L$28,"<="&D4,$M$4:$M$28,">="&D4)+3.5,
IF(E4="",SUMIFS($N$4:$N$28,$L$4:$L$28,"<="&D4,$M$4:$M$28,">="&D4),0)))),0)

hi.. sorry...

i will follow your instruction from my next message...
 
Upvote 0
Re: Formula not working / posiible to simplify

tks a lot its working..
 
Upvote 0
Re: Formula not working / posiible to simplify

Hi justy... one of my subscribed thread is pending response.. can you pls check to help me..
 
Upvote 0

Forum statistics

Threads
1,223,157
Messages
6,170,419
Members
452,325
Latest member
BlahQz

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