Changing Contents of a cell.

  • Thread starter Thread starter Adam
  • Start date Start date
A

Adam

Ok, So i have a few columns of data with about 1600 rows or so per column

The data in the rows looks like what is shown below. The numbers in the
rows are stored as text. Here is what i need to do, I need the first number
ONLY, and not the percentage. So basically i need to turn every cell into
the number that appears first in every cell, and then delete the parentheses
and percentages.

Anyone have any easy way to do this?

3 (8%)
4 (12%)
0 (0%)
8 (15%)
0 (0%)
0 (0%)
0 (0%)
0 (0%)
0 (0%)
7 (5%)
6 (3%)
10 (4%)
 
Without VBA, use Text to Columns with the space as a separator.

With VBA, select the cells and run:

Sub numberr()
For Each r In Selection
r.Value = Split(r.Value, " ")(0)
Next
End Sub
 
Hey Thanks for the help,

Can you walk me through doing the without VBA method. THanks,

-ADam
 
Select the column and pull-down:

Data > Text to Columns... > Delimited > Next > check space clear tab > Next >
click first column > General > click next column > do not import > Finish
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top