How do i write an excel formula that can work either ways?

chimezie oleka

New Member
Joined
Apr 30, 2018
Messages
6
I want to write an excel formula that can compute commission charged using simple interest rate. The fields will be:

  1. Amount
  2. Percentage
  3. Commission charged
How do i write a formula that can provide answers to any field once the other two fields have been completed?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
if amount is A1, % A2 and Commission A3

Code:
=IF(A1="",A3/A2,IF(A2="",A3/A1,A1*A2))

You might have to change , into ; depending on your language in Excel
 
Upvote 0
Hello kamolga, will I have to replicate this fomular in the A1,A2 & A3 cells? Which cell will this code be entered?
No, in cell A1 you type any amount, A2 any discount, A3 Any commission but leave one of them blank. You can put that formula in any cell (C5 for example), as long as it is not A1, A2 or A3 and it will show the missing part: if you put a amount in A1 and a percentage in A2, it will show the value of commission. If you put values in A1 and A3, it will show % (decimal). Basically if you put 2 values in any A1, A2, A3, it will show the missing one
 
Last edited:
Upvote 0
If it does not work, it means it has to be ";" instead of ","

Code:
[LEFT][COLOR=#333333][FONT=monospace][I]=IF(A1="";A3/A2;IF(A2="";A3/A1;A1*A2))[/I][/FONT][/COLOR][/LEFT]
 
Upvote 0
@chimezie oleka
If you have it solved, could you be so kind and publish your outcome here for anyone searching to solve the same or similar problem.
Thank you very much.
 
Upvote 0
Suppose; A1=Amount, A2=℅ and A3=commission charged.

Your objective to a formulae that can return the answer to any one of the variables provided the other 2 variables are known.

Code 1 : = IF(A1="",A3/A2,A1)
Code 2: = IF(A2="",A3/A1,A2)
Code 3: = IF(A3="",A1*A2,A3)

Enter each of these codes in any 3 cells where you want the results to be displayed.

For instance:
With this code, if you enter amount in A1 and commission charged in A3, the percentage applied will be displayed as a result in the cell where code 2 was inserted.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

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