Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default Changing Contents of a cell.

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%)

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Changing Contents of a cell.

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
--
Gary''s Student - gsnu200770


"Adam" wrote:

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%)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default Changing Contents of a cell.

Hey Thanks for the help,

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

-ADam
"Gary''s Student" wrote:

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
--
Gary''s Student - gsnu200770


"Adam" wrote:

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%)

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Changing Contents of a cell.

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
--
Gary''s Student - gsnu200770


"Adam" wrote:

Hey Thanks for the help,

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

-ADam
"Gary''s Student" wrote:

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
--
Gary''s Student - gsnu200770


"Adam" wrote:

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%)

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default Changing Contents of a cell.

NM, Figured it out,

Thanks again

"Adam" wrote:

Hey Thanks for the help,

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

-ADam
"Gary''s Student" wrote:

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
--
Gary''s Student - gsnu200770


"Adam" wrote:

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%)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Length of Cell Contents taylord1936 Excel Discussion (Misc queries) 6 August 20th 08 12:41 AM
Changing cell contents Mike Excel Discussion (Misc queries) 2 February 11th 08 04:41 PM
Changing Cell Contents Colour Spiller Excel Discussion (Misc queries) 3 November 24th 06 01:40 PM
Changing the Contents of a Cell PaulW Excel Discussion (Misc queries) 0 March 30th 06 10:40 AM
Changing the contents of a cell... dynamically? Friendly Indián Excel Programming 14 February 4th 04 01:13 PM


All times are GMT +1. The time now is 05:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"