Formula to copy partial content of a cell?

G

Guest

Guest
Question:
I am wondering is there an excel formula to copy one partial content of a cell to another cell?
eg. Copy 90 from Weight-90 in a cell to another cell
Thanks in advance
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
On 2002-03-12 08:19, Anonymous wrote:
Question:
I am wondering is there an excel formula to copy one partial content of a cell to another cell?
eg. Copy 90 from Weight-90 in a cell to another cell
Thanks in advance

In B1 enter: =RIGHT(A1,2)

where A1 houses Weight-90, would result in 90.

Is that what you're looking for?
 
Upvote 0
If you want to just pull off the last two characters from a cell then you would use:

=right(a1,2) where a1 is the cell in question.

If it more complicated than that, let me know.

Robin
 
Upvote 0
If I have a text
Weight = 60kg
How can I copy just the number 60(no kg included)?
Thanks in advance
 
Upvote 0
I really need formula to do this
because I have about 40000 of cells. If I do it one by one, it will take forever to get it done
 
Upvote 0
The can you use has has been suggested:

=LEFT(D14,2)*1

Will return a real number.

If not is the number always followed by "kg"? If so use:

=SUBSTITUTE(D14,"kg","")*1



_________________
Kind Regards
Dave Hawley
OzGrid Business Applications
Microsoft Excel/VBA Training
0zGrid.BusApp.170x60.gif

This message was edited by Dave Hawley on 2002-03-12 09:01
 
Upvote 0
If your entries always look like:

Weight = 60kg or Weight = 103kg

You can use the following and it will separate the number at two to three numbers:

=IF(SEARCH("k",A1)=13,MID(A1,10,3),MID(A1,10,2))+0

The formula is set up for the string in cell a1, change and copy appropriately.

Cheers,

Nate
This message was edited by NateO on 2002-03-12 09:20
 
Upvote 0
Might as well go 4 deep (weight from 1 to 4 didgits) at this point:

=IF(SEARCH("k",A1)=11,MID(A1,10,1)+0,IF(SEARCH("k",A1)=12,MID(A1,10,2)+0,IF(SEARCH("k",A1)=13,MID(A1,10,3)+0,MID(A1,10,4))+0))

Hope this helps. Cheers,

Nate
This message was edited by NateO on 2002-03-12 09:41
 
Upvote 0

Forum statistics

Threads
1,213,526
Messages
6,114,136
Members
448,551
Latest member
Sienna de Souza

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