Combine Formulas

Crawford_BoyMom

New Member
Joined
Apr 16, 2021
Messages
7
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
Hello! I need some help combing these two formulas. Any suggestions/ideas would be greatly appreciated. Thanks in advance! :)
=IF(A1="","",IFERROR(B1/A1,1))
=IF(A1<0,(A1/B1)*-1,A1/B1)
 

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.
Will this work?
=IF(A1="","",IFERROR(ABS(B1/A1),1))
 
Upvote 0
Will this work?
=IF(A1="","",IFERROR(ABS(B1/A1),1))
Unfortunately that did not work. When the value in B1 is higher than the value in A1 it gives me 200%.
For instance:
A1 (3) / B1 (6)= 200% when it should be 50%.
 
Upvote 0
Unfortunately that did not work. When the value in B1 is higher than the value in A1 it gives me 200%.
For instance:
A1 (3) / B1 (6)= 200% when it should be 50%.
Did not notice the A1/B1 and B1/A1 :)
This?
=IF(IFERROR(B1/A1,1),IF(A1="","",ABS(A1/B1)))
 
Upvote 0
Is this what you want?
Excel Formula:
=IF(A1="","",IF(A1=0,1,ABS(A1/B1)))
 
Upvote 0
I will be using only while numbers in cells A1 and B1. If both cells are 0, then it will return 100%, if the cells are blank then cell C1 will also be blank. As long as cell A1’s value is greater than cell B1’s it works perfectly in my original formula that I shared. It’s when B1’s value is great than A1’s that the problem occurs. I found a formula to account for that (the second formula I shared), but I can’t figure out how to combine the two.
065628A1-5B71-4BE3-9221-086A91668178.jpeg
11E5DD77-6E4B-4E07-A2E3-D1B17AA4C98A.jpeg
DC3E9A0C-5A75-4663-A0EF-1E1DF9976F06.jpeg
803B8594-CD06-4E91-A464-447394B1888B.jpeg
 
Upvote 0
I will be using whole numbers.
I will be using only while numbers in cells A1 and B1. If both cells are 0, then it will return 100%, if the cells are blank then cell C1 will also be blank. As long as cell A1’s value is greater than cell B1’s it works perfectly in my original formula that I shared. It’s when B1’s value is great than A1’s that the problem occurs. I found a formula to account for that (the second formula I shared), but I can’t figure out how to combine the two. View attachment 36845View attachment 36846View attachment 36847View attachment 36848
 
Upvote 0
Can you please post some sample data, along with expected results. Those images are unreadable.

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

Forum statistics

Threads
1,213,524
Messages
6,114,117
Members
448,549
Latest member
brianhfield

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