View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Quote Marks Through VBA

Fill column A with all the keyboard characters:

A
B
C
..
..
..

both upper and lower case and the keys like as well


Then in B1 enter:
=CODE(A1) and copy down.
--
Gary's Student


" wrote:

Thanks! That works - is there a place I can see all the character code
numbers?

Gary''s Student wrote:
I put them in explicitly thru chr():


Sub brett()
Dim s As String
s = "=IF(Sheet2!G6=" & Chr(34) & "Maturity" & Chr(34) & ",1,2)"
Cells(1, 1).Formula = s
End Sub

--
Gary's Student


" wrote:

Very simple question, but I can't figure it out:

I want to make a formula in a cell through VBA, but I want the formula
to have a word in it (which needs to be in quotes). That is, I want
the formula to read:

=IF(Sheet2!G6="Maturity",1,2)

How can I get the Maturity part surrounded by quotes?

Thanks!

Brett