Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
This is a snip from the code I am running on the sheet: If IsEmpty(Target) Then Target = "15" E551 - $300" I want it to return '15" E551 - $300' The problem I am having is the ability to use the inches symbol ("). I get an error when I use this code because visual basic thinks that the " is the end of the value. Anyone have any idea how to get around this? Thanks Sean |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe Target.Value = "15"" E551 - $300"
Two doublequotes after the 15. -- Jim wrote in message ups.com... | Hello, | | This is a snip from the code I am running on the sheet: | | If IsEmpty(Target) Then Target = "15" E551 - $300" | | I want it to return '15" E551 - $300' | | The problem I am having is the ability to use the inches symbol ("). I | get an error when I use this code because visual basic thinks that the | " is the end of the value. | | Anyone have any idea how to get around this? | | Thanks | | Sean | |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If IsEmpty(Target) Then Target = "15" & chr(34) & " E551 - $300"
-- HTH, Gary Brown If this post was helpful to you, please select ''YES'' at the bottom of the post. " wrote: Hello, This is a snip from the code I am running on the sheet: If IsEmpty(Target) Then Target = "15" E551 - $300" I want it to return '15" E551 - $300' The problem I am having is the ability to use the inches symbol ("). I get an error when I use this code because visual basic thinks that the " is the end of the value. Anyone have any idea how to get around this? Thanks Sean |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In my limited vba experience, one has to put in double quotations around
quotations. Try this: "15" & """" & " E551 - $300" " wrote: Hello, This is a snip from the code I am running on the sheet: If IsEmpty(Target) Then Target = "15" E551 - $300" I want it to return '15" E551 - $300' The problem I am having is the ability to use the inches symbol ("). I get an error when I use this code because visual basic thinks that the " is the end of the value. Anyone have any idea how to get around this? Thanks Sean |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Sean,
In my limited vba experience I have found that quotations have to be surrounded by double quotations. Try this: "15" & """" & " E551 - $300". " wrote: Hello, This is a snip from the code I am running on the sheet: If IsEmpty(Target) Then Target = "15" E551 - $300" I want it to return '15" E551 - $300' The problem I am having is the ability to use the inches symbol ("). I get an error when I use this code because visual basic thinks that the " is the end of the value. Anyone have any idea how to get around this? Thanks Sean |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Or:
If IsEmpty(Target) Then Target = "15" & Chr(34) & " E551 - $300" " wrote: Hello, This is a snip from the code I am running on the sheet: If IsEmpty(Target) Then Target = "15" E551 - $300" I want it to return '15" E551 - $300' The problem I am having is the ability to use the inches symbol ("). I get an error when I use this code because visual basic thinks that the " is the end of the value. Anyone have any idea how to get around this? Thanks Sean |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help displaying "Maximum" or "Minimum" if cell is max or min in a group? | Excel Discussion (Misc queries) | |||
Excel displaying inches not cm | Excel Discussion (Misc queries) | |||
convert column with inches to 2 columns "feet" and "inches" | Excel Discussion (Misc queries) | |||
Convert inches & display as Feet Inches and Fractions -- BUG FREE | Excel Worksheet Functions | |||
How do I display numbers as feet AND inches, as in x'x" ? | Excel Programming |