Excel If Formula Error - excel

I am working on excel sheet with multiple formulas. One thing that made me wonder is the IF formula. Consider the below table filled from Cell E3 to G5.
The formula that I am using at cell G5 is
=IF((G3+G4)=(E5+F5),+G3+G4,"OFF")
Considering the values from example itself, the formula should evaluate TRUE and total the G3 and G4, but I am not sure why it not evaluating TRUE. I checked for number format for all the cells, it is having the format as accounting.

You can round the numbers before adding them:
=IF((ROUND(G3,2)+ROUND(G4,2))=(ROUND(E5,2)+ROUND(F5,2)),G3+G4,"OFF")

If you are calculating any of the values by formula then you may have a very small decimal that the formatting is dropping off. For example if G4 = -59400003.570001 then your value will be "OFF".
I recommend hard-coding the values and verifying that the values are truly to the penny and not smaller.

Related

How to refer to a current cell in a range when using conditional rules?

I have a column of cells range(A2:A10) containing a date for the first day of each week.
I want the cell color to change when the date is in the past.
When I select the cells I can apply a conditional rule but I can't figure out how to write the formula so it applies to each individual cell.
For example:
formula
=A2>TODAY()
works
However that rule will apply to the whole range returning the result for whether the date value in A2 is in the past.
I want the formula so that the value in A3 is the deciding factor for cell A3, A4 is the deciding factor for A4 etc..
The best way I can explain it would be using "this" in coding when writing the formula.
Select cells you want formatting in. For example A2:A10. When creating rule choose "Format only cells that contains" and in "Format only cells with:" choose "less than" and write =TODAY() formula:
Result:
Keep in mind that date format may be different due to settings.
Also tested your formula and it works fine:

How to Multiply Multiple Cells with a Constant Cell

I had a table in excel where prices of products are written in US Dollars. I want to change these cells to Euros and some markup so I had to multiply all these cells with a constant cell which contains something like this =0.86*1.03*1.15.
The problem is I had to keep initial US Dollar amount on the formula because I had to change this constant cell regularly due to currency and markup changes. So every time I change it, it has to multiply with the initial amount.
I tried to set multiply formula to each cell but there are too many to write it every cell the same formula. Is there any option to set a formula to apply all those cells where multiplies initial amount with the constant cell?
So, you should do something like this, assuming the constant is in cell A1 and the prices in cells A5 onwards.
In cell B5 enter:
=$A$1*A5
and drag down as far as needed.
Edit, based on comments: if the values are in an existing table, then the calculations could be performed in a helper column then copy / pastevalues back over the original prices...

LibreOffice highlight cells if they are the same as a specific range

Master and Step Chart
Hello, I'm using A4-E4 as a "Master" code, and incrementally using A5-A8 to replace A4, B5-B8 to replace B4, etc etc first replacing one number of the "master", then two different numbers, etc until I have basically every combination. At some point the same number as the "master" is going to be generated. I have the numbers separated into groups of 16 on individually sheets for a total of 64 sheets. Obviously at some point the same number "43254" is going to generate on one of the sheets. Is there a way to search/highlight that number automatically upon generation? I've found that I can do conditional formatting to search for a specific cell, but not a range of cells. Like compare "A4-E4" to every set of five adjacent numbers in all the sheets, then highlight it. I have no idea if this is possible, but I'd appreciate it.
Select cells A4 through E4 and go to Format -> Conditional Formatting -> Manage. Apply style Good if Formula is:
CONCATENATE($A4;$B4;$C4;$D4;$E4)="43254"
So 43254 matches.
And 43253 does not match.
This is more complex than first appears. The following explanation may be difficult to understand if you do not have much experience with conditional formatting.
The formula gets evaluated 5 times, once for each of the cells.
Normally, rather than always indicating cell A4, Calc would interpret A4 as the currently evaluated cell (because we selected cells starting from A4). And B4 would indicate the cell to the right of the current cell that is evaulated. So for example, if such a conditional formatting formula were filled to cell D7, then A4 would actually indicate cell D7, and B4 would indicate cell E7.
However, our formula uses $A4 instead. The $ tells Calc that we always want column A even if the formatting is for column B or C et cetera.
One outcome of this is that the formula can be filled down or up but not left or right. If it is filled down one row for example, $A4 refers to column A but the current row, which would be cell A5.

Formula to Search for Data in One Column, then Apply Formula

I am working on a personal budget sheet in excel, and it's formatted based on my pay dates, to provide more drilled-down information. I have attached an example of it below for reference.
I would like to put a formula into J2, J3, and J4 which will take the data in cells C9:C26 and H9:H16, match it to the date in cells D2:D4, then subtract the expenses in D9:D26 and I9:I16 from E2, E3, and E4.
As you can see, I have just individually summed the cells; however, I would like a formula to be able to adjust as I change the value in cells C9:C26 and H9:H16.
I have found that I can do it with ONE cell, but not multiple or a range. This is the formula I used, and I cannot find a way to make it apply to the entire range of cells: =IF(C14=D3,E3-D14)
I've also tried: =IF(C9:C25=D3,E3-D9:D25) -- I know this formula doesn't work and why. I cannot figure out how to get column C to correspond with column D.
The Budget Sheet
You just need to use SumIf().
In cell J2, put this formula: =SumIf($C$9:$C$25,$I2,$D$9:$D$25)+SumIf($H$9:$H$25,$I2,$I$9:$I$25) and drag down the three cells.
With that, you can add E2-[formula] to subtract all that from E2. Or of course, just do e2-J2 instead. I think that should do what you're looking for. If it's not quite it, let me know and I can tweak.
If you plan to have more than 1 criteria go with SUMIFS
Yes, with S

Excel Conditional formatting with weighted total

I have sets of values in rows in Excel
First row contains weights of how much each value in each column contributes to weighted total.
Now, I want to mark in each following row the value that contributed to the weighted total the most, by changing its background. I played with conditional formatting, but my Excel skills are modest, to say the least.
So, how do I do that?
Assuming the weights are in A1:C1 and the values are in A2:C2, enter
=MAX($A$1:$C$1*$A2:$C2)/A$1 as the 'equals' condition for A2
alt text http://www.vulomedia.com/images/12339ExcelConditionalFormatting.jpg
In words this formula is (maximum of (values x weights)) / this column's weight.
Experienced Excel users may notice that if this formula was entered in a worksheet cell it would have to be entered as an array formula to give the correct value. The trick here is that when formulae are used in conditional formats they are always treated as array formulae; no Ctrl-Shift-Enter required.
Here's what I think you are trying to do: You have a list of numbers (they happen to be weights, but that's not important). You want the largest number to be highlighted differently.
Suppose the cells are in the range A1:A8.
Select the range A1:A8.
Select Conditional Formatting (Format | Conditional Formatting)
Enter the condition Cell Value is/Equal To/=MAX(A1:A8)
Click the Format... button and set the Pattern to affect the background.
(Tested on Excel 2003 on Windows.)

Resources