match text

nikhil0311

Board Regular
Joined
May 3, 2013
Messages
200
Office Version
  1. 2013
Platform
  1. Windows
currency help.xlsx
ABC
1Sr No.CurrencyOutput
21USDAUDUSDAUD
32GBPUSDGBPUSD
43AUDUSDUSDAUD
54GBPAUDGBPAUD
65INRUSDINRUSD
76USDGBPGBPUSD
Sheet1


Hello friends, hope you are doin well. The data is there in column B and I want the output in column C.

I am looking to identify similar currency combination but they are not in similar format
For instance - USDAUD is one format & AUDUSD is another format. Output should be either USDAUD or AUDUSD in column C. Let me know if this is possible? Thanks!
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hi nikhil0311,

If I've understood correctly (big if here) put this formula in cell C2...

Excel Formula:
=IFERROR(VLOOKUP(RIGHT(B2,3)&LEFT(B2,3),$B$2:B2,1,FALSE),B2)

...and copy down as far as needed.

Regards,

Robert
 
Upvote 0
Hi nikhil0311,

If I've understood correctly (big if here) put this formula in cell C2...

Excel Formula:
=IFERROR(VLOOKUP(RIGHT(B2,3)&LEFT(B2,3),$B$2:B2,1,FALSE),B2)

...and copy down as far as needed.

Regards,

Robert
Exactly what I was looking for, Sir. Thank you so much!!
 
Upvote 0
Exactly what I was looking for
Checking ...
Does that mean the values cannot occur again further down the column? For example below I have 3 rows that contain one of the USD/AUD combinations but the suggested formula in column C returns two different values for that combination.

If that is an issue for you, would always putting the two currencies in alphabetical order (column D) be any use to you?

24 08 12.xlsm
ABCD
1Sr No.CurrencyOutput
21USDAUDUSDAUDAUDUSD
32GBPUSDGBPUSDGBPUSD
43AUDUSDUSDAUDAUDUSD
54GBPAUDGBPAUDAUDGBP
65INRUSDINRUSDINRUSD
76USDGBPGBPUSDGBPUSD
87USDAUDAUDUSDAUDUSD
Currencies
Cell Formulas
RangeFormula
C2:C8C2=IFERROR(VLOOKUP(RIGHT(B2,3)&LEFT(B2,3),$B$2:B2,1,FALSE),B2)
D2:D8D2=MID(B2&B2,1+3*(RIGHT(B2,3)<LEFT(B2,3)),6)
 
Upvote 0

Forum statistics

Threads
1,221,522
Messages
6,160,314
Members
451,637
Latest member
hvp2262

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top