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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
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 :) :diablo:

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#5B9BD5]Column1[/td][td=bgcolor:#5B9BD5]Column2[/td][td=bgcolor:#5B9BD5]Column3[/td][td=bgcolor:#5B9BD5]Column4[/td][td=bgcolor:#70AD47]Custom[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7]xxx[/td][td=bgcolor:#DDEBF7]
4​
[/td][td=bgcolor:#E2EFDA]
40​
[/td][/tr]
[/table]


or

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#5B9BD5]Column1[/td][td=bgcolor:#5B9BD5]Column2[/td][td=bgcolor:#5B9BD5]Column3[/td][td=bgcolor:#5B9BD5]Column4[/td][td=bgcolor:#70AD47]Custom[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7]zzz[/td][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7]
4​
[/td][td=bgcolor:#E2EFDA]
60​
[/td][/tr]
[/table]


or

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#5B9BD5]Column1[/td][td=bgcolor:#5B9BD5]Column2[/td][td=bgcolor:#5B9BD5]Column3[/td][td=bgcolor:#5B9BD5]Column4[/td][td=bgcolor:#70AD47]Custom[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7]
4​
[/td][td=bgcolor:#E2EFDA][/td][/tr]
[/table]


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,223,948
Messages
6,175,571
Members
452,652
Latest member
eduedu

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