Search and find all "$" in a string

D

DontKnow

Hi Guys,

I need help to search and find all the "$" in a range so as the outpuit
looks like this

"A10:AG10"

At the moment the unwanted string looks like this

"$A$10:$AG$10"

Is their a way that I can be rid of the $ from my string range.

I have tried instr command and then deleting the found value etc but it is
rather cumbersome.

Can someone help me??

Many thnaks for your input in advance!!

Cheers,
 
R

Rick Rothstein

Where did you get that text from? If it was from the Address property of a
Range, you could have that property give it to you in the form you want by
making use of its optional arguments. For example, execute this line in the
Immediate Window...

MsgBox Range("B2:H3").Address & vbCrLf & _
Range("B2:H3").Address(False, False)

Notice the $ signs in the first line and, for the same range, the lack of
them in the second line.
 
D

DontKnow

Thanks Guys

Thats excellent!!

Cheers

Rick Rothstein said:
Where did you get that text from? If it was from the Address property of a
Range, you could have that property give it to you in the form you want by
making use of its optional arguments. For example, execute this line in the
Immediate Window...

MsgBox Range("B2:H3").Address & vbCrLf & _
Range("B2:H3").Address(False, False)

Notice the $ signs in the first line and, for the same range, the lack of
them in the second line.
 

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