Remove any text values from numbers?

zendog1960

Active Member
Joined
Sep 27, 2003
Messages
453
I have a column of values that are like follows:

Column D
6'
36'
110'
etc

I have the same situation in column E as well. In column F I would like a formula that will add both values in Column D & E in each row. How do I get around the " ' " foot indicator with each value? Keep in mind that I have some 32 worksheets to go through.

THanks so much in advance!

Zen
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
24,209
In the long run, you may want the cells to have a custom format that appends the foot marker, so the cell contents are numbers and conversion is not needed. You could use Text to columns with a delimiter of ' to convert from text to numbers. The custom format would #' append the foot marker to the numbers.

For a short term solution.
=VALUE(LEFT((A1,LEN(A1)-1)) will change 12' (in A1) to 12
 

Yogi Anand

MrExcel MVP
Joined
Mar 12, 2002
Messages
11,454
I have a column of values that are like follows:

Column D
6'
36'
110'
etc

I have the same situation in column E as well. In column F I would like a formula that will add both values in Column D & E in each row. How do I get around the " ' " foot indicator with each value? Keep in mind that I have some 32 worksheets to go through.

THanks so much in advance!

Zen

Hi Zen:

I don't know the full scope of your problem ... but for what you have shown, use the following code ...
Code:
For Each cell In Range("F2:F4")
    cell.Value = Val(Cells(cell.Row, 4)) + Val(Cells(cell.Row, 5))
Next cell

and adapt it suit your needs.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,517
Messages
5,837,791
Members
430,516
Latest member
thaling

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
Top