Combining concatenate and if in Excel formulas - excel

How would I add the IF(ISBLANK formula to this formula
=CONCATENATE(TEXT('Unapplied Report'!A5,"0000"),TEXT('Unapplied Report'!C5,"000"),TEXT('Unapplied Report'!D5,"0000"))
without getting any errors. I've tried it a couple times and just get formula error messages.

Maybe you're looking for this instead?
=CONCATENATE(IF(ISBLANK('Unapplied Report'!A5),"",TEXT('Unapplied Report'!A5,"0000")),
IF(ISBLANK('Unapplied Report'!C5),"",TEXT('Unapplied Report'!C5,"000")),
IF(ISBLANK('Unapplied Report'!D5),"",TEXT('Unapplied Report'!D5,"0000")))
This will concatenate only those cells that are not blank.

I think this is what you're looking for:
=IF('Unapplied Report'!A5="","",TEXT('Unapplied Report'!A5,"0000"))&IF('Unapplied Report'!C5="","",TEXT('Unapplied Report'!C5,"0000"))&IF('Unapplied Report'!D5="","",TEXT('Unapplied Report'!D5,"0000"))

Related

Google Sheets ROUNDDOWN formula doesn't work in Excel?

This is a formula I'm using in a Gantt/time-line chart to drive different values to a cell:
=if(AND((K$3>=$G8),(K$3<=$H8)),if((ROUNDDOWN($J8*$I8)<=(K$3-$G8)), "X", "Y"),"")
It works fine in Google Sheets, but when pasted into Excel, it throws an error that says "Not enough arguments were entered for this function."
Is there an easy way to fix this?
your roundown part is missing an argument. try this =IF(AND((K$3>=$G8),(K$3<=$H8)),IF((ROUNDDOWN($J8*$I8,0)<=(K$3-$G8)),"X","Y"),"")
I was able to just add a comma after J8*I8, and that seemed to solve the issue. Excel required a digit there for some reason.

EXCEL replace "False" with the word "NO"

I'm trying to print the word NO in the input if a condition is false. Here is what I'm currently trying
=IF (A2="a")AND(b2="b", "YES","NO")
It seems like this would work but I keep getting this error | Formula parse error.
I'm new to EXCEL and I have no idea what I'm doing wrong? Any help would be great Thanks!
You were close. Try this
=IF(AND(A2="a",B2="b"),"YES","NO")
Use If() and AND like this:
=IF(AND(A2="a",b2="b"),"Yes","No").
Pay special attention to the closing ) in And(), I've frustrated myself many times by forgetting that and wondering why my If formula wasn't working.
Format the cell with a custom format
[=1]"YES";"NO"
Then convert the formula result in the cell to an integer.
=INT(AND(A2="a",B2="b"))

Nested if formula (Excel)

Hi I am trying to write a formula where if cell (J$4) = 1120 then it would run one statement, whereas if cell (J$4) = 1120s it would run another. I am using index-match to lookup the appropriate value. However, I can't seem to get my formula to work and I was wondering if you guys can find my error. The error is 'you've entered too many arguments for this function'. Any help would be appreciated! Thank you!
formula:
=IFERROR(IF(J$4="1120S",INDEX(B1HY3!$A$3:$F$300,MATCH("L 22a",B1HY3!$F$3:$F$300,0),5),IF(J$4=1120,INDEX(B1HY3!$A$3:$f$300,MATCH("L 22a",B1HY3!$f$3:$f$300,0),5)+INDEX(B1HY3!$A$3:$F$300,MATCH("L 22b",B1HY3!$F$3:$F$300,0),5),0),0)
Always try to follow parentheses' colors it is quite useful when handling with large formulas,furthermore try always to evaluate your formulas to check where the error is.
It worked for me:
=IFERROR(IF(J$4="1120S",INDEX(B1HY3!$A$3:$F$300,MATCH("L 22a",B1HY3!$F$3:$F$300,0),5),IF(J$4=1120,INDEX(B1HY3!$A$3:$F$300,MATCH("L 22a",B1HY3!$F$3:$F$300,0),5)+INDEX(B1HY3!$A$3:$F$300,MATCH("L 22b",B1HY3!$F$3:$F$300,0),5))),0)
It was nessesary to close the parenthesis of the second if

Convert COUNTIFS for use in XL2003

I have 2 formula's that work fine in XL2010, but not in XL2003, I figured out that COUNTIFS are the problem.
Could someone help me convert them so I can use them in both versions of XL
This is one of the XL2010 codes:
=COUNTIFS(CXPATS!I:I,">="&EOMONTH(TODAY(),-4)+1,CXPATS!I:I,"<"&EOMONTH(TODAY(),-1)+1)
Below is one of my many attempts using SUMPRODUCT, but they either don't work or continually show #NUM!
=SUMPRODUCT(--(CXPATS!I:I>=EOMONTH(TODAY(),-4)+1,--(CXPATS!I:I<EOMONTH(TODAY(),-1)+1))
This is the other XL2010 code:
{=SUM(COUNTIFS(CXPATS!L:L,{"6859*","685A*"}))}
...and one of my many attempts using SUMPRODUCT again, but again I keep getting #NUM! on most attempts
=SUMPRODUCT(--(CXPATS!L:L="6859*"),--(CXPATS!L:L="685A*"))
You cannot reference whole columns using SUMPRODUCT so I used a DNR instead (shown below as DATES in the code) to get the exact range and the formula now works:
=SUMPRODUCT(--(DATES>=EOMONTH(TODAY(),-4)+1),--(DATES<EOMONTH(TODAY(),‌​-1)+1))

Dynamically Adding Parameters to CountIfs in VBA

I'd like to use countifs in VBA without knowing the amount of criteria/ranges. So in the example below, my script would see that there were 2 criterias, and apply 2 sets of criteria/ranges.
How do I do this in VBA, I can do everything apart from put it in the countifs formula. I tried putting it in a string/variant, ie: Application.Worksheetfunctions.Countifs(stringvariable) but it has not worked, I understand why it has not worked but I can't find a way to do this.
Thanks in Advance for your help.
1) Create the formula as a string
2) Use application.evaluate(var) to get the result

Resources