Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I need help please.
if f18-f22 = < 0 I need it to print in f26
if it is = > 0 I need it to print in f28.
Can anyone help please.
Thanks

I assume you're referring to an Excel spreadsheet. What exactly do you mean by "print in?" You mean you need to print the contents of cell F26? or F28? Or, do you need to place the results of the formula in F26 or F28 based on the results of the criteria?

So, if it is equal to zero then it should print (appear) in F26 and F28?
In F26 use:
=IF(F18-F22<1,F18-F22," ")
Meaning that if F18 minus F22 is zero or less then use the formula and if it is not then leave F26 as blank.In F28 use:
=IF(F18-F22>-1,F18-F22," ")
Meaning that if F18-F22 is zero or greater then use the formula and if it is not then leave F28 as blank.Use can either use these formulas directly in F26 and F28 respectfully or use them in a Conditional Sum.
You can not really direct input to a cell from another cell such as "If F18-F22 is less than or equal to zero then in F26 input the result of the formula". The formula needs to refer to the cell itself or should I say that it is the cell reference that is to the left of the equal symbol.
eg. F26=IF(F18-F22<1,F18-F22," ") but one would input the formula into F26 and then you don't actually refer to F26. You just input the formula that refers to it by virtue of where the formula resides.
eg. =IF(F18-F22<1,F18-F22," ")HTH
Bryan

I have to correct Bryan, because when F18-F22 = between 1 and -1, say 0,5 it is going to show 0,5 and that is not being asked. Bryan's explanation is correct but not matching his formula, it should say:
=IF(F18-F22=<0,F18-F22,"")
=IF(F18-F22=>0,F18-F22,"")
Now however if it is 0, it shows in both places 0 and not nothing(remove the = from one of them).
Also Bryan used " " (space) as blank, space is text and sometimes text cannot be used in calculations and formulaes!
Sorry Bryan

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |