If Formula to calculate cell with value

willsnicholas

New Member
Joined
Jun 19, 2019
Messages
6
I am trying to create a formula that will create a result for a cell if a range of three cells has a value:

IN K6------->

IF D6 contains value multiply G6 by 15
IF E6 contains value multiply G6 by 15
IF F6 contains value multiply G6 by 10

Each row (6-xxxx) will have a value in ONLY one cell

HELP!?????????
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
You didn't say what might be in D6, E6 or F6 (numbers, text, blank), so this just checks to see if anything is there. What happens if all three conditions fail?

Code:
=IF(OR(NOT(ISBLANK(D6)),NOT(ISBLANK(E6))),G6*15,IF(NOT(ISBLANK(F6)),G6*10,"?"))

sandy666: doesn't yours assume the values are numbers and you always multiply by 15 whereas sometimes you multiply by 10?
 
Last edited:
Upvote 0
if prefer this way :) :devilish:

Column1Column2Column3Column4Custom
xxx
4​
40​

or

Column1Column2Column3Column4Custom
zzz
4​
60​

or

Column1Column2Column3Column4Custom
4​

Code:
[SIZE=1]// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Finish = Table.SelectColumns(Table.AddColumn(Source, "Custom", each if [Column1] <> null then [Column4]*15 else if [Column2] <> null then [Column4]*15 else if [Column3] <> null then [Column4]*10 else null),{"Custom"})
in
    Finish[/SIZE]
 
Last edited:
Upvote 0
How about

=IF(D6<>"",G6*15,IF(E6<>"",G6*15,IF(F6<>"",G6*10,"")))

Or
=G6*IF(D6<>"",15,IF(E6<>"",15,IF(F6<>"",10)))

Or
=G6*IF(OR(D6<>"",E6<>""),15,IF(F6<>"",10))
 
Upvote 0
Thanks Dante... i have another question, but would it be easier to see my screen? Are we allowed to take it to that level?

Essentially i am doing planning, and i need to generate turnover times, if a number changes in a certain box, i need to add a 10 min "penalty" for changeover, to calculate exact run time.

How about

=IF(D6<>"",G6*15,IF(E6<>"",G6*15,IF(F6<>"",G6*10,"")))

Or
=G6*IF(D6<>"",15,IF(E6<>"",15,IF(F6<>"",10)))

Or
=G6*IF(OR(D6<>"",E6<>""),15,IF(F6<>"",10))
 
Upvote 0
Thanks Dante... i have another question, but would it be easier to see my screen? Are we allowed to take it to that level?

Essentially i am doing planning, and i need to generate turnover times, if a number changes in a certain box, i need to add a 10 min "penalty" for changeover, to calculate exact run time.

You can explain it with examples.
You can upload images to dropbox

You could upload a copy of your file or img file to a free site such www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. If the workbook contains confidential information, you could replace it with generic data.
 
Upvote 0

Forum statistics

Threads
1,214,617
Messages
6,120,541
Members
448,970
Latest member
kennimack

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