Calculate a chopped string

scrupul0us

Well-known Member
Joined
Sep 7, 2004
Messages
641
Given cell O37:
10 HOURS @ 35$/HOUR

Formula in P37:
=LEFT(O37,2)*(LEFT(O37,13)-LEFT(O37,11))

Returns:
#VALUE

LEFT(O37,2): should return 10
(LEFT(O37,13)-LEFT(O37,11)): should return 35 but i beleive is where the error lies

Any help? :) TY
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
=LEFT(A1,FIND(" ",A1)-1)*MID(A1,FIND("@",A1)+1,FIND("$",A1)-1-FIND("@",A1))

Assumes the structure is static as above.
 
Upvote 0
=LEFT(O37,FIND(" ",O37))*SUBSTITUTE(LEFT(O37,FIND("$",O37)-1),LEFT(O37,FIND("@",LEFT(O37,FIND("$",O37)-1))+1),"")

Not as clean as Jon's, but just another way of doing things...
 
Upvote 0

Forum statistics

Threads
1,203,673
Messages
6,056,677
Members
444,881
Latest member
Stu2407

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