Excel's formula commenting using +N("...") - excel-formula

=VLOOKUP(Q3096&" ",'C:\Users\13169\Desktop\December 2020\FL80\[MPR HEADER (DECEMBER 2020).xls]WORKSHEET'!$O$31:$O$51,1,0)+N("Comment")I am trying to add comment inside Excel's formula using +N("..."). Sometimes, it is working and sometimes it is not (Do not know why?). The vlookup formula is returning #value! error. Any solution? Thanks!

if you are trying to add the comment if the vlookup is not returning any value try this:
=IFNA(VLOOKUP(Q3096&" ",'C:\Users\13169\Desktop\December 2020\FL80[MPR HEADER (DECEMBER
2020).xls]WORKSHEET'!$O$31:$O$51,1,0),"Comment")
for older versions that don't have "IFNA" formula try this:
=IF(ISNA(VLOOKUP(Q3096&" ",'C:\Users\13169\Desktop\December 2020\FL80[MPR HEADER (DECEMBER
2020).xls]WORKSHEET'!$O$31:$O$51,1,0)),"Comment",VLOOKUP(Q3096&"
",'C:\Users\13169\Desktop\December 2020\FL80[MPR HEADER (DECEMBER
2020).xls]WORKSHEET'!$O$31:$O$51,1,0))

Related

Returning the value using INDEX MATCH based on the latest date

I would like to have the value populated (B1) when data is entered into A1 based on the latest date. I have no idea how to incorporate a max function together with an Index Match.
See screenshot below.
If you have Excel 365 you can do it using MAXIFS:
MAXIFS
Function
=MAXIFS(F2:F7;D2:D7;A2;H2:H7;MAXIFS(H2:H7;D2:D7;A2))
If you got an older Excel version, you can do it using SUMPRODUCT:
=SUMPRODUCT(MAX(--(D2:D7=A2)*--(H2:H7=SUMPRODUCT(MAX(--(D2:D7=A2)*H2:H7)))*F2:F7))
Rectify the strings to dates!
Use MAXIFS or SUMPRODUCT
Formulas used to rectify strings to date:
=MID(A22,FIND(" ",A22)+1,3)
=VLOOKUP(B22,$Q$81:$S$92,2,0)
=DATEVALUE(SUBSTITUTE(SUBSTITUTE(A22,B22,C22)," ","."))
=D22

Trying to create a Excel Product formula Manual to Dynamic

I have been using Product formula manually since long to make calculations but now i want to make it work as Dynamic formula works.
But my result is not matching.
Below is the sheet link where both formulas are.
https://docs.google.com/spreadsheets/d/1w5PBoIycEFbjEW0tdOTZ1NDmvtqeHLw4/edit#gid=278652113
Using the following in G3 reproduces the data & result of F3:
=product(iferror(index(C:C,match(E2, A:A,0)),$A$1),filter(B:C,(A:A<E3)*(A:A>E2)),index(B:B,match(E3,A:A,0)))-1
For the first value I added a little workaround because your list is lacking January 1st of 2020. (That's the IFERROR directing to $A$1. I'm sure there's a cleaner solution for that, but.. it works.
The FILTER function is for Office 365.
For older excel versions use the following:
=product(OFFSET($B$1,MATCH(E2,A:A,0)-1,1),OFFSET($B$1,MATCH(E2,A:A,0),,COUNTIFS(A:A,"<"&E3,A:A,">"&E2),2),OFFSET($B$1,MATCH(E3,A:A,0),,,))-1
To workaround the value not being found for January 1st, 2020 I added this manually in A1

Dynamically extract a list of unique values from a column range in Excel?

I found this example in an excel tutorial
The following image is my desired result. and the following formula is supposed to be able to extract the unique records dynamically. I know how to do this with VBA but i really want to make this a formula without using a macro.
=IFERROR(INDEX($B$2:$B$9, MATCH(0,COUNTIF($D$1:D1, $B$2:$B$9), 0)),"")
I have tried the above formula as given in the example link above but it returns with error. I am assuming that this worked at some point in excel however it no longer works with Excel 2016. Can someone clarify why this formula no longer works? Thank you.
Answering my own question about 5 minutes later, so i read the patch nodes on the how match changed from excel 2008 to 2016. You need to use the index rather than the count.
=IFERROR(INDEX($B$2:$B$9, MATCH(0,INDEX(COUNTIF($D$1:D1,$B$2:$B$9),0,0),0)),"0)),"")")
Recommended edit to the formula to change the value returned on error to a blank:
=IFERROR(INDEX($B$2:$B$9, MATCH(0,INDEX(COUNTIF($D$1:D1,$B$2:$B$9),0,0),0)),"")

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))

How to get 0 to display instead of #DIV/0 in Excel 2010

I am a novice at Excel and need some help with a formula. I have a set of cells that are the sum of a formula. They are based on information from month to month. At times this can be zero. I want to average them out and am using this formula =AVERAGE(IF(F17:Q17<>0, F17:Q17,"")). That works fine. But, I want it to display 0 if there are no values other than 0, instead it shows #DIV/0! Any ideas?
a simple way is to =if(sum(F17:Q17)=0,0,average(if(F17:Q17<>0,F17:q17,""))) there's also the 'averageifs' statement you should be using to make life simpler.
the IFERROR wrapper will take care of that problem. It's am optimized version of IF(ISERROR(formula)....
Your formula would then be
=IFERRROR(AVERAGE(IF(F17:Q17<>0, F17:Q17,"")),0)
note that this will hide all errors, so make sure your formulas work as expected first, before putting the IFERROR around them.

Resources