it count it, even if cell is blank - excel

I’ve put on formula below to leave this cell empty if cell AQ2184 is empty, but still gives me one in some random instances. Other times it leaves it empty. There is a formula In the cells to count which I guess it’s why it counts the cell as if there is character even that it’s empty….what I find very confusing is that it only does it the odd times, but when it does it drives me crazy because I don’t know why it’s behaving like this. If I take the formula off and simply enter the number/s, it works fine, but I need the formula in column AS. I've tried changing the format to number, general and text, but no matter what I do it always does the odd thing in one row or another......why? is there anything I could do?
=IF(ISBLANK(AQ2184),"",COUNT(AS2184))
Also tried; =IF(AS2190>=1,"1","") but it doesn't behave

Try this:
IF(AQ2184="","",COUNT(AS2184))

Related

Vlookup Returns Values for some cells but not others

=VLOOKUP($I2&"|"&$J$1,MatrixD!A1:D5030,4,0)
That's my formula for the problem I am having. So the problem is this will return the proper value for say the first ten values when dragged down then it will show N/A for the remaining values that are exactly a like. The other problem is if I manually go and write the formula in it gets a value. So why does it works for some and not for others when everything is the same and i've checked for spaces and formatting issues everything came back true when tested.
For a little more context it is looking for a value in a helper row (ex.ABC|123)
so the first part of the formula is putting together the value it should look for since there are eight things for each ABC.
Dragging down MatrixD!A1:D5030 it does not remain "exactly the same" - Excel automatically adjusts the range when not anchored (with $s).

Returning a blank cell if another is blank with formula already present in Excel

So I've got this system here where I'm tallying up a score difference.
Here is the formula I have for this cell:
=IF(SUM(P6:X6)>0,Y5-Z5,N5-O5)
The thing is when there is no sum (as in the cells in the formula are blank), I'm left with the 0 in this cell and I'm wanting it to just be blank like the others. The only thing is the cells it is referring to are formulas themselves, so when I've tried to do ISBLANK and such it didn't work. I want it to check whether Y5 has a number in it. If it does, then my cell does the formula above, if not, then returns blank. The only other thing is I need it to be able to state 0 as well so simply hiding 0 won't work. I'm confused as to how I can get that to do it, I'm sure there's a way though.
If it helps to understand, I'm doing a golf scoresheet. The cell in question is the total score. So could be -10 or 0 or 20. Y5 is the total strokes. I'm wanting the cell to be blank if nothing is on the scorecard. But I also need it to be able to say 0 if the score actually goes 0. P-X column is holes 10-18. The reason "(P6:X6)>0" is there, so the score only reflects holes 10-18 if those were played, whereas it will show the score relative for the first 9 holes instead if not. Hope that makes sense.
Maybe you could use ISNUMBER() for your Y5 cell.
Then, if TRUE, you use the formula.
Else, you return "".
=IF(ISNUMBER(Y5),IF(SUM(P6:X6)>0,Y5-Z5,N5-O5),""))
Is that what you are aiming for ?
Hope it helps.
Change the cell number format to,
general;general;;general
In fact, the number format couls be much more specific than that but you are short on details. The main point is that the third argument's format mask is blank. This halts the display of zero values.
A custom number works like this
<positive>;<negative>;<zero>;<text>
Test the cases separately:
=IF(SUM(P6:X6)>0,IF(AND(Y5="",Z5=""),"",Y5-Z5),IF(AND(N5="",O5=""),"",N5-O5))
You can use COUNTBLANK; it will count a cell as blank even if the cell's contents is a formula that results in blank. The formula below has holes 1-18 in columns A-R with a total in column S. If all cells are blank, the result is blank. If any of the cells contain numbers, the result is a number (zero, positive or negative).
=IF(COUNTBLANK(A2:R2)=18,"",SUM(A2:R2))
Managed through lots of trial and error to solve it myself. Thanks to all those that posted.
Here was what I came up with which seems to work well:
=IF(SUM(P8:X8)>0,SUM(Y7-AA7), IF(SUM(E8:M8)>0,SUM(N7-O7),""))

Value fading after executing an IFERROR, INDEX/MATCH array formula in excel?

I came across an interesting issue today that I can't seem to find a solution on the internet for. I have a formula that looks like this:
=IFERROR(INDEX(Table,MATCH(1,(Table,Col1=A1)*(Col2= B1),0),3),"NOPE")
The formula works correctly, but in some cases where the return value is 0 (i.e. the value is blank in column 3 that is being returned, but there are appropriate matches in Col1 and Col2) something wonky happens. When I execute the formula the 0 value shows briefly and then slowly fades to blank. When you copy the cell and try to paste the value plain text it is also blank. What concerns me is this only happens in some cases, other cells have a 0 value returned and it remains in the cell.
My best guess is it has something to do with the cell formatting (even though it is set to general for all cells), but I'm at a loss. This doesn't really impact the performance of the spreadsheet, but it looks sloppy having some cells with 0's and others that are blank even though they indicate the same result.
Any help would be greatly appreciated.
Edit 2: Changed the values from numeric to text 1=A, 2=B, etc. and this did not solve the problem, there are still some stubborn cells with the issue described above.
EDIT 3: Haven't had any luck fixing the issue. My work around for the time being is IF(original formula)= 0,"", (original formula)) for uniformity so empty results are returned as a blank and not a 0 or blank. Strangely, I tried IF(original formula)= 0,0, (original formula)) and the zero still faded in some cells.
I have had this happen before. I suspect you might be using Office 365, and a recent update threw Excel on this one. What I got to work is to create a new worksheet, format the column in question from the beginning as a number (or currency), and then enter the formula into the cell (do not copy from the other worksheet). Paste this formula down and it should be a consistent "0" or "-".
I also have found that it helps to save the file as a ".xlsb" for larger files. This tends to add stability in all areas.

Shortening COUNTIF formulas in Excel

I'm not sure if this is a duplicate question, I've tried looking around but I don't see any duplicates. Pardon me if I'm wrong.
I've got a simple formula that I stacked many times to give me my end result, but I feel like it's too long.
I have 2 questions:
1) What can I do to shorten this super-long mess of a formula I've come up with; and
2) Is there a better way to do it?
I need someone to at least point me in the right direction to get started.
This is the formula: =IF((COUNTIF(B1:B10,"VC1"))=1,IF((COUNTIF(B1:B10,"VC2"))=1,IF((COUNTIF(B1:B10,"VC3"))=1,IF((COUNTIF(B1:B10,"VCG1"))=1,IF((COUNTIF(B1:B10,"VCG2"))=1,IF((COUNTIF(B1:B10,"X"))=1,IF((COUNTIF(B1:B10,"XM"))=1,IF((COUNTIF(B1:B10,"XG"))=1,IF((COUNTIF(B1:B10,"P"))=2,"10","P"),"XG"),"XM"),"X"),"VCG2"),"VCG1"),"VC3"),"VC2"),"VC1")
Basically, I have text in cells B1 to B10, each with unique values.
In case it's needed, the values are (not in order): X, XM, XG, VCG1, VC1, VC2, VC3, VCG2, P, P.
A different cell will have the formula that I mentioned, to ensure that each cell has a very specific text defined, or else it'll show an error message.
Because of this, I also have another question:
3) What can I do to make it such that I can search (or COUNTIF) all the values from B1 to B10, and make sure that there's an exact number of values with very specific texts inside, without it going in order of the formula?
To explain this further, the formula does an IF, then a COUNTIF. If the COUNTIF succeeds, it will move on to the next COUNTIF inside the value for the result. Because of this, I can't print multiple "errors" at once, and it goes for each "error" one by one, which can be confusing to the end user.
It might be something else than what you want, but what if you use something like this?
=(COUNT(B1:B10;"VC1")=1)*1&
(COUNT(B1:B10;"VC2")=1)*1&
(COUNT(B1:B10;"VC3")=1)*1&
(COUNT(B1:B10;"VCG1")=1)*1&
(COUNT(B1:B10;"VCG2")=1)*1&
(COUNT(B1:B10;"X")=1)*1&
(COUNT(B1:B10;"XM")=1)*1&
(COUNT(B1:B10;"XG")=1)*1&
(COUNT(B1:B10;"P")=2)*1
it would create a string of zeroes and ones (false and true) and from this you would be able to identify if something is wrong and even how many errors occured and why.

Index Match Works on some cells, not others

I was using this Index Match formula with no issues:
=INDEX('Rain Data For 9 Stations'!A:S,MATCH(RainWICSProximity!J100,'Rain Data For 9 Stations'!A:A,0),INDEX($N$4:$N$12,MATCH(H100,$M$4:$M$12,0)))
I added more data, and it now only returns some values, while returning #N/A for others, even though there is a value to return.
Index returns the value in a range.
What you are doing is =INDEX(MATCH(),INDEX(MATCH())). It works due to some luck, because sometimes the second Index() returns cell with value as well. However, if the second index returns cell with an empty value, then the first index has to return something like =Index(4,0), which is #N/A.
In general, try =Index(Match(),Match()).
To see where exactly the error is, select the cell with the formula, go to the Excel ribbon >Formulas>Evaluate Formula.
Then press a few times Evaluate Formula and see what happens:
See this answer for step-by-step formula evaluation.
#Vityata was correct, Index, Match, Match works wonderfully, also, my original formula does work.
The issue was, I had calculate set to Manual, not auto, in excel settings.
I believe you need to expand your range. I am not real familiar with Index Match but trying to learn to use it more, but I believe it is kind of like VLOOKUP. Your ranges $N$4:$N$12 and $M$4:$M$12 is where it is looking right? If so, those ranges are not expanding even though you added more data. So you need to expand it to like $M$4:$M$100 or whatever. Or expand it to find the last row which is what I usually do. like mine would be "$M$4:$M" & LastRow & "" or something like that.

Resources