Formula not working properly

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
304
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Would you please provide some feedback on the following formula? It is supposed to be converting the data in cell CSV!AQ3 from feet and inches to decimal inches and doesn't seem to be doing it properly. On my spreadsheet it's showing the result is 4.375 when (I think) it should be 19.625.

The formula was written this way because the CSV the data is pulled from will frequently have spaces randomly put in at the end of it depending on the mood of the data entry person.

I've placed the formula in [ brackets ] and included the number displayed in CSV!AQ3.

Any help is appreciated.


[ =IFERROR(LEFT(CSV!AQ3, FIND("'", CSV!AQ3) - 1), 0) * 12 + SUBSTITUTE(IFERROR(MID(CSV!AQ3, FIND("'",CSV!AQ3) + 1, 8), CSV!AQ3), """", "") ]


CSV!AQ3 contains: 1'-7 5/8"
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
the minus sign between 1' and 7 is causing the issue
 
Upvote 0
I cannot remove the minus. This would require scouring anywhere from one to over 500 rows of data to remove any that were used. Do you have any suggestions how the formula can be altered to work properly if the data entry person adds a minus?
 
Last edited:
Upvote 0
+1 to +3 makes this one work, no idea how that works for other values
 
Upvote 0
How about
IFERROR(LEFT(CSV!AQ3, FIND("'", CSV!AQ3) - 1), 0) * 12 + ABS(SUBSTITUTE(IFERROR(MID(CSV!AQ3, FIND("'",CSV!AQ3) + 1, 8), CSV!AQ3), """", ""))
 
Upvote 0
Fluff - your revision seems to have done it! Thank you!
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,812
Members
449,048
Latest member
greyangel23

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