Help with SUM formula

Sean15

Well-known Member
Joined
Jun 25, 2005
Messages
698
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))
 
I think the user's Excel version doesn't support TEXTBEFORE.
Oh. My bad. I am unfamiliar with checking to see what options are available with which versions. Any help on that subject would be appreciated so this doesn't happen again.
 
Upvote 0

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
What do these two formula return
Excel Formula:
=CODE(D3)
and
Excel Formula:
=CODE(MID(D3,3,1))
Blood work results.xlsx
ABCDEFGH
112/29/20213/2/2023
3Trimus45 mg/dL47 mg/dL52160
sheet2
Cell Formulas
RangeFormula
G3G3=CODE(D3)
H3H3=CODE(MID(D3,3,1))
 
Upvote 0
Thanks for that, try
Excel Formula:
=(LEFT(SUBSTITUTE(D2,CHAR(160)," "),3)-LEFT(SUBSTITUTE(B2,CHAR(160)," "),3))
 
Upvote 0
Solution
Thanks for that, try
Excel Formula:
=(LEFT(SUBSTITUTE(D2,CHAR(160)," "),3)-LEFT(SUBSTITUTE(B2,CHAR(160)," "),3))
Excellent, thank you. Formula in G6 and G7 returned #VALUE so I added IFERROR to take care of error.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
Try this:

=LEFT(IF(LEN(D2)>0,D2,0),3)-LEFT(B2,3)
 
Upvote 0

Forum statistics

Threads
1,216,080
Messages
6,128,692
Members
449,464
Latest member
againofsoul

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