Help! Excel Question

R

radlee

I have two columns of information

Column A is a name and column B is a Text Field..... here is what I
want to be able to do:

Here are two examples:

If coumn A has Jane Doe and column B has T3866 how can I make column C
automatically become *Jane Doe* and column D become *T38666683T*

What I am wanting to do is take a list of names and add a leading and
lagging * and then take the next field add the text in reverse order
and then add a leading and lagging *.

The second example is John Doe 12345 (columns A and B) - I would want
columns C and D to be *John Doe* *1234554321*.

Is this doable? How?
Thanks in advance for any help!
 
B

Bill Ridgeway

I wonder why you have chosen to do this and whether there may be a better
way of achieving your objective. Sometimes it's better to express a problem
in terms of what you're ultimately trying to achieve instead of how you
perceive a solution.

Regards.

Bill Ridgeway
Computer Solutions
 
C

Carim

Hi Bill,


1. ="*"&A1&"*"
2.
="*"&B1&RIGHT(B1,1)&MID(B1,4,1)&MID(B1,3,1)&MID(B1,2,1)&LEFT(B1,1)&"*"

HTH
Cheers
Carim
 
G

Gord Dibben

Another method close to Carim's but with a UDF

="*"& A1&"*" in C1

="*"&B1 & revstr(B1)&"*" in D1

Drop this UDF into your workbook into a general module.

Public Function RevStr(rng As Range)
RevStr = StrReverse(rng.text)
End Function


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top