Detla symbol in code

D

David

Hi Group,

I have a cell where I am trying to put in some text:
ActiveCell.Offset(1, 5).Value = "7DayΔ"

but I am unable to get the Δ character to work. Possibly I have to use
unicode?

Thanks,
David
 
J

JLGWhiz

Try this:

Sub dk()
MyText = "7DayD"
Range("B2") = MyText
Range("B2").Characters(5, 5).Font.Name = "Symbol"
End Sub
 
D

David

Hi,
This worked, thank you. I got it to work with out the MyText

Sub dk()
Range("B2") = "7DayD"
Range("B2").Characters(5, 5).Font.Name = "Symbol"
End Sub

Thanks Again,
David
 
D

David

Sorry,

I did some other research and found:
ActiveCell.Offset(1, 5).Value = "7Day" & ChrW(948)
but the above does not give me Delta, but some other character. Any ideas,
it is simplier to use, if it would work correctly.

Thanks,
David
 
B

Bernie Deitrick

David,

948 is lower case delta, ChrW(916) is upper case (though I'm sure there are
others as well, such as 8710).

ActiveCell.Offset(1, 5).Value = "7Day" & ChrW(916)

HTH,
Bernie
MS Excel MVP
 
D

David

Hi Bernie,

This worked perfectly. I looked all over and saw the other ChrW in several
places, but it sure did not work. Did you find this on line? Could you share
the reliable source that you used, since mine was wrong?

Thanks Again,
David
 
B

Bernie Deitrick

David,

I didn't have a source - I wrote a bit of code like

Sub ListExtendedASCII()
Dim i As Integer
Dim j As Integer
For i = 901 To 1000
With Cells(i - 900, 1)
.Value = ChrW(i)
.Offset(, 1) = AscW(.Value)
End With
Next i
End Sub

to look at the characters in the 900 range, since I knew from you that 948 was lower case delta.

You can extend the code to show the whole list.

HTH,
Bernie
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