I have a column of dates (daily) and I want an IF statement that will check if the corresponding cell is the 17th of any month.
I'm happy with the syntax of if statements but am unsure how I should be using wildcards here. 'x'below can be any numerical value.
The cell in question looks like - 17/07/2019.
= IF( cell = 17/**/****,x,0)
Excel gets confused and tries to show me how to do maths without a formula.
If you already know that the date is not a text value you can use a simple formula like:
=IF(DAY(A1)=17,”x”,0)
The only issue is that your dates may be genuine Excel dates or text values. With data in A1, in another cell enter:
=IF(ISNUMBER(A1),IF(DAY(A1)=17,"X",0),IF(LEFT(A1,2)="17","X",0))
I need help with function required in C14
sum starts by checking month date from B11 and sum the values starting from that date forward, also need to make sure that "location" and "function" match the criteria.
Please check attached image
Tried:
=sumifs(A2:A8&B2:B8,A16&B16,index(D2:J8,,match(C11,D1:J1,0)))
=INDEX($D$2:$J$8,MATCH(A15&B15,A2:A8&B2:B8,0),MATCH(C11,D1:J1,0))
gave me error and didn't work
I believe the easiest way is to use SUMPRODUCT which will sum multiple columns, based on multiple criteria. This formula should do what you need, place it in cell C14 (the result is 150):
=SUMPRODUCT(($A$2:$A$8=A14)*($B$2:$B$8=B14)*($D$1:$J$1>=$B$11)*($D$2:$J$8))
Explanation of function from Excel
I am getting incorrect results in excel when cross-referencing formulas.
I firstly created a cell D4 = AVERAGE(D1:D3) formatted in a percent 2.70%.
Now I am trying to use this percent in D4 to multiply a number in cell A1, 176522.5 which should give me the answer 4766.1075 however Excel is returning the value 4758.19902 which is incorrect.
I think the problem is coming from Excel using the AVERAGE(D1:D3 instead of the actual value in the cell.
Apologies is this may seem trivial.
How can I force Excel to use the actual value and not the formula?
=ROUND(your formula , 2)
2 represents the number or decimal points you want to use. a negative number will round to the left of the decimal. set 2 to be a number that matches however many decimal points you are using. in the case of a percentage, you may need to add 2 to the number of decimal places.
I'm working on a spreadsheet and I need to have a set of cells ignored if they are blank. I tried a regular average formula as well as if statements and nothing seems to be working. The values need to be adjusted so they come to a common value. Here is the formula I am trying to use to calculate the average.
=(AVERAGE(D4,(F4*0.6),(H4*(6/7))))
This formula will calculate the average but is not ignoring cells that do not have a value.
Excel should automatically ignore truly blank cells when using the =Average() formula. However, if you do have some "0" data or space characters, you could use the following to find the average of anything that is numeric:
=SUM(A:A)/COUNT(A:A)
Where A:A is your range.
EDIT: Simplified to use Count which only finds numeric cells.
EDIT 2: Given your specific example, the average function could look as follows:
=IFERROR((D4 + (F4*0.6) + (H4*(6/7)))/COUNTA(D4,F4,H4), 0)
I'm looking for a formula to return one of six possible results based on which date (if any) is the highest out of all dates available that fall within a specific date range.
Consider the following layout:
Cell A1 has a fixed date (this is my lower constraint)
Cell A2 has a fixed date (this is my upper constraint)
Cells G5:K5 may contain dates or they may be blank.
If G5 and H5 both contain dates and both of those dates are between my dates in A1 and A2, then I want the result of my formula to identify which of those two is the most recent (it can show the date itself, the column header, a text string, doesn't matter as long as it is something different for each column)
If any of G5:K5 also contain other dates that fall outside of the window defined by A1 & A2 then those dates should be ignored.
If none of the dates are within the permitted range or all of the cells are blank then it can return a string like "not applicable" or an error that I can rewrite using IFERROR.
My dataset is pretty big (I'll be copying this formula down several hundred rows) so I would prefer to avoid using an {array} formula if possible - too slow. I've been staring at this worksheet long enough for my brain to have turned to mush, so if there is a straightforward approach to reaching my goal it is currently eluding me.
Any assistance greatly appreciated!
Figured it out in the end. It's not pretty, but it works.
This part returns the highest valid date:
MAX(IF(AND(G5>=$A$1,G5<=$A$2),G5,0),IF(AND(H5>=$A$1,H5<=$A$2),H5,0),IF(AND(I5>=$A$1,I5<=$A$2),I5,0),IF(AND(J5>=$A$1,J5<=$A$2),J5,0),IF(AND(K5>=$A$1,K5<=$A$2),K5,0))
And then by nesting it I can convert the results to a different text string depending on which column contains the "winner".
=IF(AND(MAX(IF(AND(G5>=$A$1,G5<=$A$2),G5,0),IF(AND(H5>=$A$1,H5<=$A$2),H5,0),IF(AND(I5>=$A$1,I5<=$A$2),I5,0),IF(AND(J5>=$A$1,J5<=$A$2),J5,0),IF(AND(K5>=$A$1,K5<=$A$2),K5,0))=G5,G5<>""),"CA",IF(AND(MAX(IF(AND(G5>=$A$1,G5<=$A$2),G5,0),IF(AND(H5>=$A$1,H5<=$A$2),H5,0),IF(AND(I5>=$A$1,I5<=$A$2),I5,0),IF(AND(J5>=$A$1,J5<=$A$2),J5,0),IF(AND(K5>=$A$1,K5<=$A$2),K5,0))=H5,H5<>""),"MX",IF(AND(MAX(IF(AND(G5>=$A$1,G5<=$A$2),G5,0),IF(AND(H5>=$A$1,H5<=$A$2),H5,0),IF(AND(I5>=$A$1,I5<=$A$2),I5,0),IF(AND(J5>=$A$1,J5<=$A$2),J5,0),IF(AND(K5>=$A$1,K5<=$A$2),K5,0))=I5,I5<>""),"BR",IF(AND(MAX(IF(AND(G5>=$A$1,G5<=$A$2),G5,0),IF(AND(H5>=$A$1,H5<=$A$2),H5,0),IF(AND(I5>=$A$1,I5<=$A$2),I5,0),IF(AND(J5>=$A$1,J5<=$A$2),J5,0),IF(AND(K5>=$A$1,K5<=$A$2),K5,0))=J5,J5<>""),"IQS",IF(AND(MAX(IF(AND(G5>=$A$1,G5<=$A$2),G5,0),IF(AND(H5>=$A$1,H5<=$A$2),H5,0),IF(AND(I5>=$A$1,I5<=$A$2),I5,0),IF(AND(J5>=$A$1,J5<=$A$2),J5,0),IF(AND(K5>=$A$1,K5<=$A$2),K5,0))=K5,K5<>""),"Other","Not Applicable")))))
I think I understand now. The following formula will get you the maximum date in the range G5:K5, subject to the condition that it be between the dates in A1 and A2. It will return "not applicable in the event that none of the dates meet the condition.
=IF(COUNTIFS(G5:K5,">="&$A$1,G5:K5,"<="&$A$2)<5,LARGE(G5:K5,1+COUNTIFS(G5:K5,">"&$A$2)),"not applicable")