Use parsed values in formula

mejohn

New Member
Joined
Jun 23, 2018
Messages
31
Office Version
  1. 365
Platform
  1. Windows
Hello,

I'm trying to calculate the volume of a solution based on the mass, components, ratio of components and density.
I've entered formulas in column E, but would like a formula that can account for single or multiple components in the solution, as well as their respective ratios and densities.
I'd like to use column B to find the component, column C to find ratio of components and match those with column F and G to determine the density to be used in the calculation.

Thank you in advance for taking the time help me with this important problem.

A (sample)B (component/s)C (component ratio)D (mass (g))E (volume (ml))F (component)G (density)
solution1NotWater1:Water55:45350=(D1*0.55/0.75)+(D1*0.45/1)Water1
solution2NotWater2:NotWater183:17423=(D2*0.83/0.96)+(D2*0.17/0.75)NotWater10.75
solution3NotWater21525=(D3*1/0.96)NotWater20.96
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
The colon's in column C are problematic - they want to make the data into 'time'. So I switched to "-" there.

MrExcelPlayground6.xlsx
ABCDEFG
1A (sample)B (component/s)C (component ratio)D (mass (g))E (volume (ml))F (component)G (density)
2solution1NotWater1:Water55-45350414.167Water1
3solution2NotWater2:NotWater183-17423461.599NotWater10.75
4solution3NotWater21525546.875NotWater20.96
Sheet14
Cell Formulas
RangeFormula
E2:E4E2=IF(C2=1,(D2*C2/G2),(D2*(LEFT(C2,SEARCH("-",C2)-1)/100)/VLOOKUP(LEFT(B2,SEARCH(":",B2)-1),$F$2:$G$4,2,FALSE))+(D2*(RIGHT(C2,LEN(C2)-SEARCH("-",C2))/100)/VLOOKUP(RIGHT(B2,LEN(B2)-SEARCH(":",B2)),$F$2:$G$4,2,FALSE)))
 
Upvote 0
Solution

Forum statistics

Threads
1,215,055
Messages
6,122,902
Members
449,097
Latest member
dbomb1414

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