Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
crop away the letters
For the following, I need to crop away the letters with a macro, excel
97 VWXY1234567Z CropIt = Right(Liscence, 8) 1234567Z How do I crop away the "Z" leaving only 1234567 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
crop away the letters
Without using VBA: =--LEFT(RIGHT(A1,8),7)
The double negation is used to convert the resulting text to a number And this UDF does the same Function CropIt(mycell) CropIt = --Left(Right(mycell.Value, 8), 7) End Function best wishes -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "Fan924" wrote in message ... For the following, I need to crop away the letters with a macro, excel 97 VWXY1234567Z CropIt = Right(Liscence, 8) 1234567Z How do I crop away the "Z" leaving only 1234567 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
crop away the letters
Hi,
Try =MID(A1,5,7). If this helps please press Yes. John "Fan924" wrote: For the following, I need to crop away the letters with a macro, excel 97 VWXY1234567Z CropIt = Right(Liscence, 8) 1234567Z How do I crop away the "Z" leaving only 1234567 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
crop away the letters
Sub dural()
Liscence = "VWXY1234567Z" CropIt = Left(Right(Liscence, 8), 7) MsgBox (CropIt) End Sub -- Gary''s Student - gsnu2007L "Fan924" wrote: For the following, I need to crop away the letters with a macro, excel 97 VWXY1234567Z CropIt = Right(Liscence, 8) 1234567Z How do I crop away the "Z" leaving only 1234567 |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
crop away the letters
CropIt = Left(Right(Liscence, 8), 7)
Thanks, I was close by couldn't get the syntax right. ;<] |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
crop AutoCAD object | Excel Discussion (Misc queries) | |||
crop spreadsheet | New Users to Excel | |||
Is there a way to crop text in an Excel cell? | Excel Discussion (Misc queries) | |||
Any function for Crop/Cut Text | Excel Worksheet Functions | |||
I want to truncate/crop 3854502.2 into 545 in Excel. How do I do. | Excel Worksheet Functions |