SUMIFS but for text

Declamatory

Active Member
Joined
Nov 6, 2014
Messages
319
Hi Folks,

I have the following formula:

PHP:
=IF(OR(SUMIF(Dealing!D:D,"A800F",Dealing!G:G)<>0,SUMIF(Dealing!D:D,"C800F",Dealing!G:G)<>0),"Estimate",IF(AND(B14="",E14=""),"No dealing for "&TEXT(A11,"dd/mm/yyyy"),"Confirmed"))

The cell with the formula is in a worsksheet called "Instruction" and the formula is looking at a worksheet called "Dealing" and looking in column D to see if there is a value of either A800F or C800F and where the corresponding cell in column G has a value of anything other than zero. If the result is true then the value will be "Estimate". If the result isn't true then it looks to see if the values in both Cell B14 and E14 in "Instruction" worksheet are blank. If so the result is "No dealing for" and then a date captured in cell A11. Where neither is true then the result will be "Confirmed".

I hope that explains where I'm at.

What I also need the formula to do (or at least bring through an answer in another cell ignoring the above formula) is to look in the dealing worksheet at column D for text "A800F" or "C800F" and check it the corresponding cell in column W in the dealing worksheet contains the word "Purchase". Where both of these are true then bring through a result of "Estimate"

This formula forms part of a macro where the formula in questions currently looks like:

Code:
ActiveCell.FormulaR1C1 = _
        "=IF(OR(SUMIF(Dealing!C[3],""A800F"",Dealing!C[6])<>0,SUMIF(Dealing!C[3],""C800F"",Dealing!C[6])<>0),""Estimate"",IF(AND(R[-3]C[1]="""",R[-3]C[4]=""""),""No dealing for ""&TEXT(R[-6]C,""dd/mm/yyyy""),""Confirmed""))"
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Try

=IF(SUM(COUNTIFS(Dealing!D:D,{"A800F","C800F"},Dealing!W:W,"Purchase"))>0,"Estimate",IF(AND(B14="",E14=""),"No dealing for "&TEXT(A11,"dd/mm/yyyy"),"Confirmed"))
 
Upvote 0
Thanks for the reply Jonmo1. I thought that you may have done it but if there is a value in column G greater or less than zero in the dealing worksheet then the end result should be estimate.
 
Last edited:
Upvote 0
Perhaps

=IF(SUM(SUMIFS(Dealing!G:G,Dealing!D:D,{"A800F","C800F"},Dealing!W:W,"Purchase"))<>0,"Estimate",IF(AND(B14="",E14=""),"No dealing for "&TEXT(A11,"dd/mm/yyyy"),"Confirmed"))
 
Upvote 0

Forum statistics

Threads
1,214,840
Messages
6,121,895
Members
449,058
Latest member
Guy Boot

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