Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Macro to delete last charcter in a text string

I have a problem with the data I have on my worksheet and
was wondering if maybe you guys can help. I have a column
of data actually part numbers in column D on worksheet
Open P.O. that I'm matching with part numbers in column G
on another worksheet, the formula below is what I have in
place. Now the problem I'm having is that some of the part
numbers in column D on worksheet Open P.O. have a # 1 at
the end of it, this is there because the data was imported
from our system and was placed there. but the data in
column G on the other worksheet was manully typed in by
users without the # 1 at the end of the part #. These 2
part #'s are the same but when i use the formula below
it's looking for an exact match and will return a value of
false. How can I modify the formula or create a macro that
can make these distinct differences and return a value of
yes. Hope this makes sense and thanks for any help you can
offer.

=IF(ISERROR(MATCH(G2,'Open P.O.'!
$D$2:$D$30000,0)),"NO","YES")
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Macro to delete last charcter in a text string

If it helps any there is always a space and then the # 1
for the part numbers in column D on worksheet Open P.O. so
maybe a macro that will delete the ending character if it
is spaced from the remaining string?


-----Original Message-----
I have a problem with the data I have on my worksheet

and
was wondering if maybe you guys can help. I have a column
of data actually part numbers in column D on worksheet
Open P.O. that I'm matching with part numbers in column G
on another worksheet, the formula below is what I have in
place. Now the problem I'm having is that some of the

part
numbers in column D on worksheet Open P.O. have a # 1 at
the end of it, this is there because the data was

imported
from our system and was placed there. but the data in
column G on the other worksheet was manully typed in by
users without the # 1 at the end of the part #. These 2
part #'s are the same but when i use the formula below
it's looking for an exact match and will return a value

of
false. How can I modify the formula or create a macro

that
can make these distinct differences and return a value of
yes. Hope this makes sense and thanks for any help you

can
offer.

=IF(ISERROR(MATCH(G2,'Open P.O.'!
$D$2:$D$30000,0)),"NO","YES")
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default Macro to delete last charcter in a text string

Replace your reference to G2 with

IF(MID(G2,LEN(G2)-1,1)=" ",LEFT(G2,LEN(G2)-2),G2)

which should turn out to be something like this (if I have the parentheses all correct):

=IF(ISERROR(MATCH(IF(MID(G2,LEN(G2)-1,1)=" ",LEFT(G2,LEN(G2)-2),G2),'Open
P.O.'!$D$2:$D$30000,0)),"NO","YES")


On Wed, 23 Jul 2003 15:08:25 -0700, "Brian" wrote:

If it helps any there is always a space and then the # 1
for the part numbers in column D on worksheet Open P.O. so
maybe a macro that will delete the ending character if it
is spaced from the remaining string?


-----Original Message-----
I have a problem with the data I have on my worksheet

and
was wondering if maybe you guys can help. I have a column
of data actually part numbers in column D on worksheet
Open P.O. that I'm matching with part numbers in column G
on another worksheet, the formula below is what I have in
place. Now the problem I'm having is that some of the

part
numbers in column D on worksheet Open P.O. have a # 1 at
the end of it, this is there because the data was

imported
from our system and was placed there. but the data in
column G on the other worksheet was manully typed in by
users without the # 1 at the end of the part #. These 2
part #'s are the same but when i use the formula below
it's looking for an exact match and will return a value

of
false. How can I modify the formula or create a macro

that
can make these distinct differences and return a value of
yes. Hope this makes sense and thanks for any help you

can
offer.

=IF(ISERROR(MATCH(G2,'Open P.O.'!
$D$2:$D$30000,0)),"NO","YES")
.


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
Delete part of a text string IanP Excel Worksheet Functions 3 April 6th 09 12:34 PM
Finding a charcter in a text string (take2) Bulent About this forum 0 October 30th 07 09:36 AM
Finding a charcter in a text string caldog Excel Worksheet Functions 3 October 7th 07 04:37 AM
Use a formula to delete part of a text string? Josh Craig Excel Worksheet Functions 4 June 29th 06 08:19 AM
How do I delete part of a text string in every cell it appears in Chacky Excel Discussion (Misc queries) 3 December 9th 05 07:06 PM


All times are GMT +1. The time now is 06:29 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"