Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need Help writing an IF formula on excel for the cell that says #VALUE! in my

ID: 3574627 • Letter: I

Question

I need Help writing an IF formula on excel for the cell that says #VALUE! in my picture below. The IF formula should say: IF the Code is "G" THEN return the current Volume (it is already in gallons), ELSE convert the Volume from liters to gallons (using L_PER_GAL). On My Excel Spreadsheet: Volume heading is in cell G5. Code heading is in cell H5. I tried: =IF(Data!H5="G", J7=G7), J7=G7*(1/L_PER_GAL) [This was incorrect, please help!]

State/Province Miles Volume Code KM City Massachusetts non none none none 0 Boston none Quebec 310 $40.05 35.56 1 Montreal 498.89664 Ontario 335 $41.55 36.23 L 539.13024 2 Toronto Michigan 6.41 G 381.414528 237 $17.05 3 Detroit 292 $23.62 8.53 G 469.928448 4 Mackinaw City Michigan 53 $7.79 6.47 L 5 Sault Ste Marie Ontario 85.295232 Ontario 132 $16.70 14.27 L 6 Waw. 212.433408 Ontario 116 $15.37 12.91 L 186.683904 7 Marathon Ontario 169 $20.38 17.77 L 271.979136 8 Thunder Bay 191 $14.16 5.46 G 307.384704. 9 Duluth Minnesota Minnesota 156 $13.17 4.99 G 251.057664 10 Minneapolis 7.65 G 381.414528 237 $20.02 11 Fargo 218 $26.94 25.78 L 350.836992 Manitoba 12 Winnipeg 357 $41.80 37.54 L Saskatchewan 574.535808 13 Regina Saskatchewan 156 $23.67 20.36 L 14 Swift Current 251.057664 17.58 L 231.745536 144 $18.63 15 Medicine Hat Alberta Alberta 191 $25.46 22.59 L 307.384704. 16 Calgary Montana 278 $21.95 8.12 G 447.397632 17 Great Falls Montana 155 $13.53 5.17 G 249.44832 18 Butte 9.28 G 511.771392 318 $24.68 19 Spokane Washington 282 $22.94 8.55 G Washington 20 Seattle 453.835008 21 Vancouver British Columbia 168 $24.70 21.19 L 270.369792 GAL none #VALUE!

Explanation / Answer

IF(H5="G",G5,CONVERT(G5,"gal","l"))

or

you can try this it is also work

IF('DATA'!H5="G",J7=G7,J7=G7*(1/L_PER_GAL))

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote