Help with SUM formula

Sean15

Well-known Member
Joined
Jun 25, 2005
Messages
719
Office Version
  1. 2010
Platform
  1. Windows
Hi:
Could you help with formulas in column G? I suspect #VALUE is related to unwanted spaces. I added TRIM to formula but it not correct #VALUE error.
Thank you.


Blood work results.xlsx
ABCDEFG
112/29/20213/2/2023
2Honwell180 mg/dL177 mg/dL-3
3Trimus45 mg/dL47 mg/dL#VALUE!
4Slim57 mg/dl71 mg/dL#VALUE!
5Design123.6 mg/dL117 mg/dL-6
6Safety2.7#VALUE!
7Matters4#VALUE!
8Swing11 mg/dL13 mg/dL#VALUE!
sheet2
Cell Formulas
RangeFormula
G2:G8G2=(LEFT(D2,3)-LEFT(B2,3))
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Try this. Keep in mind that there will always have to be a space delimitator. So in your example rows 6 and 7 will still throw #VALUE errors.
Excel Formula:
=TEXTBEFORE(D2," ")-TEXTBEFORE(B2," ")
 
Last edited:
Upvote 0
Alternatively:
Excel Formula:
=(LEFT(D2,FIND(" ",D2)-1)-LEFT(B2,FIND(" ",B2)-1))
 
Upvote 0
Try this. Keep in mind that there will always have to be a space delimitator. So in your example rows 6 and 7 will still throw #VALUE errors.
Excel Formula:
=TEXTBEFORE(D2," ")-TEXTBEFORE(B2," ")
I think the user's Excel version doesn't support TEXTBEFORE.
 
Upvote 0
@Skyybot as the OP is using xl2019 he doesn't have those functions.
 
Upvote 0
What do these two formula return
Excel Formula:
=CODE(D3)
and
Excel Formula:
=CODE(MID(D3,3,1))
 
Upvote 0
Then try search:
Excel Formula:
=(LEFT(D2,SEARCH(" ",D2)-1)-LEFT(B2,SEARCH(" ",B2)-1))
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

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