Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
cut off part of cell entry
Hi there,
how can I cut off part of a cell entry? cell entry: CA M 3 I would like to cut off the first two digits: CA Thanks for any help Regards, Norbert |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
cut off part of cell entry
try this sub
sub trimcells() for each cel in selection cel.value=trim(right(cel,len(cel)-2)) next cel end sub -- Don Guillett SalesAid Software "Orion" wrote in message ... Hi there, how can I cut off part of a cell entry? cell entry: CA M 3 I would like to cut off the first two digits: CA Thanks for any help Regards, Norbert |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
cut off part of cell entry
Hi Don, thanks very much for your hint, but I actually have to cut of everything but the 2 digits on the left hand side. I should have made myself a bit more clear. Sorry for that. CA M 1 should become CA PB Col 2 should become PB I tried =trim(left(cel,len(cel)-4)) which works for the first example, but not for the second one, due to the different entry length. Regards, Norbert On Fri, 17 Dec 2004 08:29:59 -0600, "Don Guillett" wrote: try this sub sub trimcells() for each cel in selection cel.value=trim(right(cel,len(cel)-2)) next cel end sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
cut off part of cell entry
Oh no,
now I found out by myself. It's actually so easy! =left(cel,2) (this I will not forget anymore!) Thanks anyway Norbert On Mon, 20 Dec 2004 10:19:06 +0200, Orion wrote: Hi Don, thanks very much for your hint, but I actually have to cut of everything but the 2 digits on the left hand side. I should have made myself a bit more clear. Sorry for that. CA M 1 should become CA PB Col 2 should become PB I tried =trim(left(cel,len(cel)-4)) which works for the first example, but not for the second one, due to the different entry length. Regards, Norbert On Fri, 17 Dec 2004 08:29:59 -0600, "Don Guillett" wrote: try this sub sub trimcells() for each cel in selection cel.value=trim(right(cel,len(cel)-2)) next cel end sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Making the AND function look at only part of a cell entry | Excel Discussion (Misc queries) | |||
Formula Help with transferring middle part of a cell entry | Excel Discussion (Misc queries) | |||
function to count the amount of cells depending on part of the cell entry | Excel Worksheet Functions | |||
matching part of an entry in a cell | Excel Worksheet Functions | |||
How do I work with part of a cell entry? | Excel Worksheet Functions |