ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF statement (https://www.excelbanter.com/excel-worksheet-functions/42162-if-statement.html)

LaNaveau

IF statement
 
I created a spreadsheet with 2 workbooks.

The 1st tab has 9 columns where ee's can enter VISA charges. The 2nd tab
has the same columns to enter CASH charges. The total line for cash charges
feeds to the 1st tab and is labeled cash expense to the top 2 rows and totals
in the 10th column of rows 8 & 9.

The rows below only have VISA totals also in the 10th column. Then, below
the last row, in the 10th column, the formula totals rows 8 thru 35, which
includes the totals for cash in 8 and 9 and all of the VISA charges. That is
in cell J 42.

Then cell C42, ee's enter their VISA total. Then in cell J 44, there is a
formula to take J42 - C42, which is the amount of cash expenses.

The problem is, I have an "IF" statement in J45:
if(j45=sum(J8:J9),"","Not Balanced")
Which if it equals, the cell will be blank, if it doesn't equal, the cell
will have "not balanced"

This does not work all of the time, even when the sum of J8:J9 equal cell J44.

Is this a formatting issue or why doesn't this logic work.

Jay

I created a spreadsheet with 2 workbooks.
...
The problem is, I have an "IF" statement in J45:
if(j45=sum(J8:J9),"","Not Balanced")
Which if it equals, the cell will be blank, if it doesn't equal, the
cell will have "not balanced"

This does not work all of the time, even when the sum of J8:J9 equal
cell J44.


While I didn't follow the details of your example, I have had this kind of
problem before. Sometimes, it's a rounding problem. Maybe things would work
better if you used something like:
if(ABS(j45-sum(J8:J9))<.005,"","Not Balanced")


All times are GMT +1. The time now is 04:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com