Amateur Radio Callsign - remove characters

Carl_London

New Member
Joined
Feb 28, 2023
Messages
19
Office Version
  1. 2016
Platform
  1. Windows
UK Amateur Radio callisgn begin with are in the format 1 or 2 letters followed by a number, there is a exception where the callsign begins with the number 2 and a letter.
Valid UK callsigs begin with a G, an M or a 2

For G or M callsign:
I want to convert callsign where if there are two letter before the number the second letter is deleted, so:

G1ABC remains G1ABC
GM1ABC would become G1ABC
M6XYZ remains M6XYZ
MS6XYZ would become M6XYZ

For 2 callsign:
The letter following the 2 is always converted to an X

2E0AAA would become 2X0AAA
2W0AAA would become 2X0AAA

Thanks for any help!

1699349708795.png
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
How about
Fluff.xlsm
AB
1
2G1ABCG1ABC
3GM1ABCG1ABC
4M6XYZM6XYZ
5MS6XYZM6XYZ
62E0AAA2X0AAA
72W0AAA2X0AAA
Data
Cell Formulas
RangeFormula
B2:B7B2=IF(LEFT(A2)="2",REPLACE(A2,2,1,"X"),IF(ISNUMBER(--MID(A2,2,1)),A2,REPLACE(A2,2,1,"")))
 
Upvote 1
IF(LEFT(A2)="2",REPLACE(A2,2,1,"X"),IF(ISNUMBER(--MID(A2,2,1)),A2,REPLACE(A2,2,1,"")))
Thanks you so much, but I only need the second half of the formula to work for callsigns beginning with a G or an M. If a callsign begins with a W, if WB1ABC that should remain WB1ABC.

I just also forgot one thing. Callsigns beginning GB should remain GB so GB1ABC would remain GB1ABC. I've been trying to add the exception to formula but can't get it to work.
Your thoughts on this final piece of the puzzle would be very welcome.

Sorry to be a pain!

Thanks again, Carl
 
Upvote 0
Ok, how about
Excel Formula:
=IF(LEFT(A2)="2",REPLACE(A2,2,1,"X"),IF(LEFT(A2,2)="GB",A2,IF(AND(OR(LEFT(A2)={"M","G"}),ISERR(--MID(A2,2,1))),REPLACE(A2,2,1,""),A2)))
 
Upvote 1
Ok, how about
Excel Formula:
=IF(LEFT(A2)="2",REPLACE(A2,2,1,"X"),IF(LEFT(A2,2)="GB",A2,IF(AND(OR(LEFT(A2)={"M","G"}),ISERR(--MID(A2,2,1))),REPLACE(A2,2,1,""),A2)))
Fluff you are my hero!

Very many thanks, by the way love the England Rugby bagde.

All the best, Carl
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,079
Messages
6,123,000
Members
449,092
Latest member
masterms

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