IF FUNCTION IN COMPARING STATEMENT OF ACCOUNTS

daniele_t

New Member
Joined
Sep 7, 2022
Messages
7
Office Version
  1. 2019
Platform
  1. Windows
Firstly, thank you and apologies for the banality of the question. I am not experienced at all with formulas. Looked through the posts but cannot find appropriate solution.

I am trying to create an IF formula to compare > (greater than) values that include negative values in statement of accounts
For example is 30 is greater than 20 then YES
and if 30 not greater than 40 then NO
so far so good, I have gotten this far.

I encounter a problem the moment I test if -20 (negative twenty) is greater than 10

which it is not.

In my example -36000 is lower than 26000

How do I include the notion that negative numbers can be lower than a positive number, even if greater.

Apologies if this has been already discussed, please point me to the correct thread.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi & welcome to MrExcel.
Unfortunately I don't understand what you are asking, negative numbers are always less than a positive number.
 
Upvote 0
correct. how do i make the distinction between a negative value and the same value but positive?
sorry if i wasnot clear from the beginning
 
Upvote 0
Do you mean you want to find the larger number regardless of positive or negative?
 
Upvote 0
actually not. trying to find if one number is larger if it is positive even if it's value is lower
 
Upvote 0
Sorry, but I still don't understand what you are asking for.
Can you post some sample data along with expected results.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
can't load anything on these pc's i work for the judicial courts and we are not allowed to access anything else than what's supplied no add ins unfortunately.

let me see if i can be clearer.

the file is large over 11k entries so need to automate the process

i have one row whose value is to be compared to another row.

row X is always positive numbers (positive numbers are credit limits)
row Y can be both positive and negative numbers (row Y is bank balance)

the simple IF function works if both values are positive.

if row Y is larger than row X then YES
if row Y is smaller than row X then NO

i run into a problem the moment that row Y is a negative number with a value that is larger than what is in
the corresponding row X

example:
row X value 80 row Y value 30 result is NO
row X value 100 row Y value 110 result is NO

problem arises when

row X is 25 and row Y is negative 35 and the result is NO

but I need it to say YES because in "monetary value" -35 is not larger than positive 25

how do I introduce the concept of negative?

How that this is enough information for you to be able to understand the issue I'm having
 
Upvote 0
Sorry, but I'm still not getting it.
What results would you expect from this
Fluff.xlsm
ABC
1
22040No
35040Yes
4-1035No
Data
Cell Formulas
RangeFormula
C2:C4C2=IF(A2>B2,"Yes","No")
 
Upvote 0
Sorry, but I'm still not getting it.
What results would you expect from this
Fluff.xlsm
ABC
1
22040No
35040Yes
4-1035No
Data
Cell Formulas
RangeFormula
C2:C4C2=IF(A2>B2,"Yes","No")
try putting 25 in A4 and -35 in B4, and you'll see why I'm stuck
 
Upvote 0

Forum statistics

Threads
1,214,935
Messages
6,122,337
Members
449,077
Latest member
Jocksteriom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top