# Need to add to the IF formula

#### F4TMAN

##### New Member
I currently have this formula that only deals with 1 logical criteria. I'm trying to add more.

Excel Formula:
``=IF(L2="",M2,L2)``

I would like the formula to Start with cell L2 if it contains a value greater than 0 then return that value otherwise move on to cell M2, if M2 has a value greater than 0 return that number, otherwise move on to R2, if R2 has a value greater than 0 than return that number. If none of these cells have values greater than zero than return blank

As always thank you!

### Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

#### julhs

##### Board Regular
Excel Formula:
``=IF(L2>0,L2,IF(N2>0,N2,IF(R2>0,R2,"")))``

#### F4TMAN

##### New Member
Excel Formula:
``=IF(L2>0,L2,IF(N2>0,N2,IF(R2>0,R2,"")))``

Thank you its close but its not working for me

#### A Durfani

##### Active Member
I currently have this formula that only deals with 1 logical criteria. I'm trying to add more.

Excel Formula:
``=IF(L2="",M2,L2)``

I would like the formula to Start with cell L2 if it contains a value greater than 0 then return that value otherwise move on to cell M2, if M2 has a value greater than 0 return that number, otherwise move on to R2, if R2 has a value greater than 0 than return that number. If none of these cells have values greater than zero than return blank

As always thank you!

Try
Book1
KLMNOPQR
1
21001
Sheet1
Cell Formulas
RangeFormula
K2K2=IF(L2>0,L2,IF(M2>0,M2,IF(R2>0,R2,"")))

#### F4TMAN

##### New Member

Try
Book1
KLMNOPQR
1
21001
Sheet1
Cell Formulas
RangeFormula
K2K2=IF(L2>0,L2,IF(M2>0,M2,IF(R2>0,R2,"")))

I tried this but it doesnt work either

#### julhs

##### Board Regular
Can there be a value >0 in more than one cell at a time. eg
Excel Formula:
``L2 = 0, M2=1, R2=1``

#### Fluff

##### MrExcel MVP, Moderator
In what way don't the suggestions work?
Please post some sample data showing the problem.

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.

Replies
1
Views
99
Replies
7
Views
315
Replies
3
Views
302
Replies
8
Views
107
Replies
3
Views
67

1,130,082
Messages
5,639,976
Members
417,120
Latest member
Pavithra devi

### 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.

### Which adblocker are you using?

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

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