Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all, i have a string and need to extract the Supplier name.
"GR extract for SAS Automotive RSA (Pty) Ltd" I need to remove the "GR extract for " as this is constant and the rest is variable in length, dependant on the supplier name. Could somebody please help me with some code. Thanks for the help in advance Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A quick and dirty way is:
Cells.Replace What:="GR extract for ", Replacement:="", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True HTH Raymond |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tempy,
=SUBSTITUTE(A1;"GR extract for ";"") supposed your original text is in cell A1. Regards, Stefi €˛Tempy€¯ ezt Ć*rta: Hello all, i have a string and need to extract the Supplier name. "GR extract for SAS Automotive RSA (Pty) Ltd" I need to remove the "GR extract for " as this is constant and the rest is variable in length, dependant on the supplier name. Could somebody please help me with some code. Thanks for the help in advance Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Stefi, danke, but as i am not a programme, could you please explain
how i would use as i have tried it by saying myValue = Substitute(A1, "GR extract for ", "") and then i get an error message ? I know you are in Germany, as the "," in South Africa is replaced by the ";" in germany. Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Stefi's is a worksheet formula, just plug it into the sheet.
-- HTH Bob Phillips "Tempy" wrote in message ... Hi Stefi, danke, but as i am not a programme, could you please explain how i would use as i have tried it by saying myValue = Substitute(A1, "GR extract for ", "") and then i get an error message ? I know you are in Germany, as the "," in South Africa is replaced by the ";" in germany. Tempy *** Sent via Developersdex http://www.developersdex.com *** |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Or, if you need the return value in a VBA variable, use it like
myValue = WorksheetFunction.Substitute(A1,"GR extract for ", "") Stefi €˛Bob Phillips€¯ ezt Ć*rta: Stefi's is a worksheet formula, just plug it into the sheet. -- HTH Bob Phillips "Tempy" wrote in message ... Hi Stefi, danke, but as i am not a programme, could you please explain how i would use as i have tried it by saying myValue = Substitute(A1, "GR extract for ", "") and then i get an error message ? I know you are in Germany, as the "," in South Africa is replaced by the ";" in germany. Tempy *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
vlookup part of string... | Excel Discussion (Misc queries) | |||
Search/Match/Find ANY part of string to ANY part of Cell Value | Excel Worksheet Functions | |||
Extract Part of String | Excel Worksheet Functions | |||
Find a part of a string | Excel Programming | |||
Remove part of string | Excel Programming |