Excel help please - simple IF & AND functions...

Associate
Joined
26 Jun 2005
Posts
1,487
I can't get my head round why this wont work for me.

Anyway, I have a Spreadsheet with some simple financial data on. Column J (Charges) will either have £0, £5, £12 or £17 (5+12). The spreadsheet is a database dump and I am trying to split the Charges into two other columns, N and O as follows:

-Column N
If J = £0 or £5 input £0 or £5
If J = £12 input £0
If J = £17 input £5

- Column O = J-N

The following works unless J = £12 where it returns £5 but it should be £0.
=IF(J2>=5,5,0)

I think the answer might be to have an AND function in there too but I can't get it to work.

Any ideas?
 
Not sure I am entirely getting what you want;

If the value in J = £0 then 0
If the value in J = £5 then 5
If the value in J = £12 then 0
If the value in J = £17 then 5

?

If that is the case then you could do the following:

=IF(J2>=5,IF(J2=12,0,5),0)

That would probably work, but as I say I am not entirely sure what you want.
 
Back
Top Bottom