LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Automating conform of cell contents so they MATCH

I have a list of countries in column 1 with corresponding values in column
2. I have a second spreadsheet with the same countries (usually spelled the
same way) in column 1 and a new set of values in column 2.

For example:

SS1 cols 1,2:

Afghanistan $50,000
Bangladesh $25,000
Bangladesh-Dhaka $10,000

SS2 cols 1,2:

Afghanistan $100,000
Bangladesh $35,000
Bangladesh-Dhaka $20,000

I would like to automatically have SS1 result in the following in cols. 1,2,3:

Afghanistan $50,000 $100,000
Bangladesh $25,000 $35,000
Bangladesh-Dhaka $10,000 $20,000

I use the functions to automate this as follows:

=IF(ISNA(MATCH(A1,Sheet2!$A$1:$A$100,0)),"NotFound ",VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0))

And is works ok.

My question:

any countries where the spelling is slightly different on each spreadsheet,
is there a way to automate the correction process to create an exact match.
For example, to auto correct Bangladesh - Dhaka to Bangladesh-Dhaka (without
the spaces on either side of the hyphen which prevents a match). Or
elimination of leading or trailing spaces which also prevents a match, or
correction of Bangladesh (Dhaka) to Bangladesh-Dhaka to enable a match.

I'm trying to avoid human intervention. There are probably only 5-6
variations (extra spaces; parenthesis to hyphens, etc.) which would have to
be checked and corrected. Is there a macro or something which could
accomplish this?

Or can MATCH be changed so it finds the closest match even if not exact?

Etc.?

hopefully, some or all of the above is possible and can be automated.
appreciate
your help. thanks
 
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
Formula to match Cell with table of contents Terry Excel Discussion (Misc queries) 1 May 20th 10 08:15 PM
autofit cell height and width to match bitmap contents gurubox Excel Worksheet Functions 0 December 18th 08 07:06 PM
Edit macro to match entire cell contents nis75p06 Excel Discussion (Misc queries) 1 September 3rd 05 04:27 PM
Conform a total to a list of results? xmaveric Excel Discussion (Misc queries) 1 August 21st 05 07:22 PM
Using VB to change sheet name to match cell contents Gary Paxson Excel Programming 4 May 24th 04 08:38 PM


All times are GMT +1. The time now is 10:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"