I honestly don't see what I am doing wrong here. I am trying to see the minimum between three cells, and I want the result to ignore if one of those cells is blank or return nothing if they are all blank.
I've tried (with an without spaces between the "")
=IF(ISBLANK("B21,B26,B31")," ",MIN(B21,B26,B31))
This gives me 0 if my cells are blank
I also tried
=IF((ISBLANK("E21,E26,E31"))),(MIN(E21,E26,E31),"")
Which doesn't do anything. I don't know how this can be wrong and it's obviously not a difficult problem but I can't seem to crack it despite the huge number of people who have asked similar questions before.
Thanks in advance
Lilou
Use AND() inside the IF:
=IF(AND(B21="",B26="",B31=""),"",MIN(B21,B26,B31))
All three must resove true for it to put "" in the cell or it will do the MIN().
Related
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.
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.
First post, sorry if it's not according to site preferences. I searched around and couldn't find a post that was exactly like this, but sorry if this is a repeat as well.
I have the following code:
=COUNTIFS(A:A,"="&C3, B:B,"<>""")
For clarity, the code is supposed to identify instances where column A has a specific value (C3), and where column B is empty.
I'm familiar with Countifs, but it was the "if blank" portion that I've been really struggling with. On top of that, column B is populated with formulas, making this seemingly more challenging from my perspective as a couple methods I've tried only work if the cells are truly unpopulated. What I can say is that this formula is working with almost all of my examples, except 1, and I have no idea why this would be. For that matter I'm not entirely sure why this code works at all.
Any insight would be greatly appreciated.
Thank you very much.
To count if blank: "="
=COUNTIFS(A:A,"="&C3, B:B,"=")
Or if this is easier to understand:
=COUNTIFS(A:A,"="&C3, B:B,"=" & "")
Which is the same.
"=" in COUNTIFS does not match blanks that result from formulas. Dont ask me why!
As workaround, you can use the flexible and never vexing SUMPRODUCT:
=SUMPRODUCT((A:A=C3)*(LEN(B:B)=0))
I am trying to make a spreadsheet with a lot of data and with numerous (11) tabs with the same concept for different people, etc.
However, I do not want a cell to contain "0" if there is nothing to show. I have tried using =IF but I am 99.99% sure I am doing it wrong, which makes it not work... Ive attached a photo showing what I have. Simply I need the sum of cells B6:K6 in P6, and down the line, etc.
Also, since I have 11 tabs with roughly the same concept, I can certainly tell it is slowing down greatly. Any advice or would Google Sheets maybe be better suited?
Thank you!
A couple of methods:
=IF(SUM(B6,K6)=0,"",SUM(B6,K6))
Or you can use a custom format on the cells like:
0.00;-0.00;
The third spot after the second ; tells excel how to show 0. In this case it will show nothing.
You can either do something like =IF(A1+B1=0,"",A1+B1)
Or you can uncheck the Show a zero in cells that have zero value option under Display options for this worksheet.
First post, but I am stuck and was hoping for some help. What I am trying to do is use a nested IF formula to determine whether the value returned by a VLOOKUP matches specific text on another sheet in the same workbook. If it does, to then use the COUNTIFS function to determine the sum of instances that specific text contained in a specific cell appears on another sheet (also in the same workbook).
One part of these formulas seems to work, but when I combine it with others, it errors and I can't figure out why.
It's probably something simple, but I'd appreciate any help. Here's the part that seems to "work"
=IF(VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="All",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")
+
(COUNTIFS('Sheet2'!$R:$R,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")))
If I put one more parenthesis, it works as is, but seems to omit some of the "All" Vlookup results... thus why I put works in quotations above. That might be an issue with my spreadsheet though, but felt I should include in case I'm just being idiotic. Regardless, when I input two additional IF statements, it errors.
The final formula I've crafted looks like this (double spaced for ease of reading only):
=IF(VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="All",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")
+
(COUNTIFS('Sheet2'!$R:$R,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")))),
IF((VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="One",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")),
IF((VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="Two",
(COUNTIFS('Sheet2'!$R:$R,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY"),
IF((VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="Three",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")),"0"))
Any ideas?
Thanks!
Ryan Olson
Just cleaned up some bracketing. Let me know how it goes as I didn't alter the formula otherwise.
=IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="All",
COUNTIFS(Sheet2!$U:$U,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY")+(COUNTIFS(Sheet2!$R:$R,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY")),
IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="One",
COUNTIFS(Sheet2!$U:$U,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY"),
IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="Two",
COUNTIFS(Sheet2!$R:$R,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY"),
IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="Three",
COUNTIFS(Sheet2!$U:$U,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY"),"0"))))