Remove Cell Content if "0" - excel

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.

Related

Is there a way to count the value of a cell under the criteria in Excel?

I've been toying with this problem for some time but no matter how hard I try, I can't wrap my head around the syntax of a command.
Screenshot of Spreadsheet:
First thing's first. The layout of this spreadsheet can't be changed in any way, making this problem a whole lot more difficult to solve. I've added a screenshot above of what the spreadsheet looks like at the moment. It is currently just a test-sheet as the master-sheet is having real data inputted into it.
So the first problem is searching the array "D:H" for the shot listed in the "I" column. For example, I want to count how many times "Vodka" appears in the array (D:H).
The second problem is I then want to sum each number contained in the cell below the criteria. Following the same example, given the criteria "Vodka" (I4), I want to be able to sum all of the cells under any cell containing the word "Vodka".
The third problem is then to multiply it by the "Amount Sold". Once again, following the same example, I would multiply it by the cells "C5" and "C9" as both of the cocktails have a shot of vodka in them.
The last problem really wraps it all up in a tight little bow. All of this will need to be adaptable to adding, removing and changing cocktails to this list, as well as the shots that are in them and the shots that are being searched.
Again, this is all test information as I don't feel as though I should be putting out anything involving my workplace.
Any help on this would be greatly appreciated.
Count amount of vodka in D:H
=COUNTIF(D4:H13, "Vodka")
Sum of all Vodka
=SUMIF(D5:H5,"Vodka", D4:H4)
Instead of Hard-coding "Vodka" in the cell you should use reference to the cells. This makes expanding the table easier
If you have the value the last multiplication is no problem.

Excel MAX/MIN but only if opposing cell is greater than 0

I've found similar examples through searching but I can't find anything that matches the issue that I have...
I have a table which shows parts received/rejected, I wish to see the maximum days early/late (I'll only need help with one as the other I can then do!)
- but there are dummy orders which I wish to ignore (they show a received/reject of 0).
Here is example data from the 'AnnualDump' sheet:
My current calculation is
=IF(ISBLANK(AnnualDump!$H$2),"BLANK",0-MIN(AnnualDump!$G:$G))
[Column H is Received/Rejected and G is VarianceDays]
This simply looks at if there is any data on the sheet before running the calculation, which is fantastic for 95% of the time... but I want to ignore any values that have a received/rejected of 0...
I want it to show 29, but it's showing 30 in this instance as it's not ignoring 0qty lines.
I've tried adding another IF statement but it didn't work :/
Completely stuck now and not sure what the next step to try is...
I can do it if I cheat (call both columns to another sheet, turn text white, use an 'IF cell greater than x, then value' to compare the whole lot and then min/max that third column) but I'm trying to avoid that!
Any pointers or help will be greatly appreciated (complete VBA noob in excel so I'd like to avoid that if possible).
Thanks
Try this array formula. Confirm with Ctrl, Shift and Enter and curly brackets will appear round the formula.
I would strongly suggest you don't use full column references though as these formulae are rather resource-intensive.
=IF(ISBLANK(AnnualDump!$H$2),"BLANK",0-MIN(IF(AnnualDump!$H:$H>0,AnnualDump!$G:$G)))

How to Account for "-" in Excel

I have been working on an excel document where I'm essentially just adding up costs for a made up company. I want to make it so that I can track the differences from year to year. For a some cells, this isn't a problem, as most of them have numerical values inputted in them. However, for cells that have no cost associated with them, I have put "-" to fill the cell. This is because, while some cells have "0" inputted in them, this 0 is meant to represent a value under 50,000 (as each cell has a value that is meant to be read in the millions). To try to get around this problem, I have been fiddling around with IF, OR and AND statements to try to tell excel to do different things depending on which cells are filled with what. There are three problematic cases: (1) when the first year I'm evaluating has a "-" in a cell and the second has a numerical value; (2) the inverse of (1); (3) when both years have "-" values. The third one I have solved separately by just putting:
IF(AND(ISTEXT(N3), ISTEXT(D3), "-", N3_D3))
However, I can't seem to be able to add solutions to problems (1) and (2). Any advice on the matter would be greatly appreciated. Thanks in advance.
What about something like this?
=IF(IF(N3="-",0,N3)-IF(D3="-",0,D3)=0,"-",IF(N3="-",0,N3)-IF(D3="-",0,D3))

Round to two decimal places

In the formula bar the data shows up as 69.849999999 and in the cell as 69.85. I am trying to get that number in the formula bar as 69.85. I tried Copy and Paste Values and almost everything else that I can think of. Even formatting the cell as a number with only two decimal places. Nothing is working.
Any ideas?
The following will radically change your data so use it with caution; possibly even on a backup copy until you are sure this is what you want.
If you have all of the numbers formatted the way you want (e.g. 0.00) then go into Excel Options (Alt+F,T). Choose Advanced from the list down the left and scroll the right pane down ¾ of the way to the When calculating this workbook section.
Click Set precision as displayed. Acknowledge the warning.
                
Remember to also click OK in the lower right to accept the option change and close Excel Options. All of the numeric values within your workbook will be rounded off to their displayed value of their number format. Note that numbers set to a General should not be affected.
Use at your own risk. I'm not saying this is a bad thing; just that you should be completely aware of the consequences before you commit large amounts of data to this option. See Change formula recalculation, iteration, or precision for more information.
Try:
=ROUND(A1,2)
then select, Copy, Paste Special, Values.
mrmcg,
=TEXT(A1,"0.00") is my preferred method here.
In hopes to be helpful it is a good idea to understand what you need to change to get the correct result. When you change the formatting (i.e. number, decimal, general) you are only changing the way the data appears, not the actual data.
You will need to use a formula like round, floor, text to change the actual data.
good luck and I hope that this is helpful!

Concatenate Formula (Getting a #REF Error)

Afternoon all :)
This is kind of a little difficult to explain but ill happily clarify where ever it is needed. Thank you for taking the time to read this post ^^ Here goes..
I am currently creating a spreadsheet that is been extracted from the database whereby I am tasked to concatenate data from 2 adjacent cells. I change the database on a frequent basis adding or removing data wherever necessary so the range of data is always different. To concatenate the two cells I use the following formula:
e.g: =IF(ISBLANK(B8&H8),"",B8&H8)
This formula works out great when im dealing with increasing amounts of data as I can simply drag the formula down as far as i want and i know that it will pick up the formula whenever I refresh the database without the need of seeing value errors when the formula ends up referring to a blank cell. The snag here (and my query as well) is if I have less data then before the formula within the last set of cells looks something like this:
e.g: =IF(ISBLANK(#REF!&#REF!),"",#REF!&#REF!)
I have dealt with #REF before in other spreadsheets whereby I simply used a ISERROR in the statement but I dont know if there is a possible way of including this within my formula. I need the ISBLANK there so I have more control and dont have to drag the formula as often.
If there is a better way around this or a way to amend the current formula Id appreciate the help :)
The only way you are going to get something like this:
=IF(ISBLANK(#REF!&#REF!),"",#REF!&#REF!)
in the formula bar is if you(or the system you are using) are somehow deleting the cells that were originally referenced. This should be avoidable. You can clear the cells referenced instead of deleting them completely - then you won't get this error - and your formulas will remain intact. Now you can certainly use the formulas provided in the comments to hide the errors - but the root of your problem seems to me to be that the errors are occuring in the first place. Good Luck.

Resources