Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Excel2003
I am using the following code to add a record to my collection page. Dim LP1C1ARNU As Double .... .... Range("D" & LRow - 1).Value = LComments1 & " " & LRun & " " & "P1C1AR" & "=" & LP1C1AR & " " & "P1C1ARNU" & "=" & LP1C1ARNU LP1C1ARNU is from another page in percent format, but shows up in the new cell as a Decimal.(ex P1C1ARNU=.157) How can I show it as Percentage?(ex P1C1ARNU=15.7%) I would also like to know how to add "alt enter" to the expression so I can line up the values in the cell. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
1. Finish the formula with
"P1C1ARNU" & "=" & Format(LP1C1ARNU, "0.0%") 2. For a new line, include the character vbNewLine: .... & vbNewLine & "P1C1ARNU" & "=" & LP1C1ARNU - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Gizmo" wrote in message ... Excel2003 I am using the following code to add a record to my collection page. Dim LP1C1ARNU As Double ... ... Range("D" & LRow - 1).Value = LComments1 & " " & LRun & " " & "P1C1AR" & "=" & LP1C1AR & " " & "P1C1ARNU" & "=" & LP1C1ARNU LP1C1ARNU is from another page in percent format, but shows up in the new cell as a Decimal.(ex P1C1ARNU=.157) How can I show it as Percentage?(ex P1C1ARNU=15.7%) I would also like to know how to add "alt enter" to the expression so I can line up the values in the cell. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
vbNewLine is adding a box symbol to my text. I tried using Chr (10) instead
and that works better. No extra characters. Cell contents from record sheet: Testing New Code that adds percent symbol to record and alignes text into 6 lines Run #27 P1C1AR=10000 P1C1ARNU=4.22% P1C1K=500.84% P1C1RNG=667 P1C2AR=10000 P1C2ARNU=4.22% P1C2K=500.84% P1C2RNG=1000 P2C1AR=0 P2C1ARNU=0.00% P2C1K=0.00% P2C1RNG=0 P2C2AR=10000 P2C2ARNU=4.22% P2C2K=500.84% P2C2RNG=1000 P3C1AR=0 P3C1ARNU=0.00% P3C1K=0.00% P3C1RNG=0 P3C2AR=10000 P3C2ARNU=4.22% P3C2K=500.84% P3C2RNG=1000 OK. I just discovered that when I tried to paste an example of the extra characters into this reply, they were gone. They still show on my record sheet though. I'll describe what i'm seeing: When looking at the text in the cell, i see a verticle line one the end of each row of text. When looking at the formula bar with the cell selected I see a small box at the end of each row of text. Does this make any sense? "Jon Peltier" wrote: 1. Finish the formula with "P1C1ARNU" & "=" & Format(LP1C1ARNU, "0.0%") 2. For a new line, include the character vbNewLine: .... & vbNewLine & "P1C1ARNU" & "=" & LP1C1ARNU - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Gizmo" wrote in message ... Excel2003 I am using the following code to add a record to my collection page. Dim LP1C1ARNU As Double ... ... Range("D" & LRow - 1).Value = LComments1 & " " & LRun & " " & "P1C1AR" & "=" & LP1C1AR & " " & "P1C1ARNU" & "=" & LP1C1ARNU LP1C1ARNU is from another page in percent format, but shows up in the new cell as a Decimal.(ex P1C1ARNU=.157) How can I show it as Percentage?(ex P1C1ARNU=15.7%) I would also like to know how to add "alt enter" to the expression so I can line up the values in the cell. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Change vbNewLine to vbLf. vbNewLine combines a carriage return (vbCr) and a
line feed (vbLf), but all you need is vbLf. Sorry. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Gizmo" wrote in message ... vbNewLine is adding a box symbol to my text. I tried using Chr (10) instead and that works better. No extra characters. Cell contents from record sheet: Testing New Code that adds percent symbol to record and alignes text into 6 lines Run #27 P1C1AR=10000 P1C1ARNU=4.22% P1C1K=500.84% P1C1RNG=667 P1C2AR=10000 P1C2ARNU=4.22% P1C2K=500.84% P1C2RNG=1000 P2C1AR=0 P2C1ARNU=0.00% P2C1K=0.00% P2C1RNG=0 P2C2AR=10000 P2C2ARNU=4.22% P2C2K=500.84% P2C2RNG=1000 P3C1AR=0 P3C1ARNU=0.00% P3C1K=0.00% P3C1RNG=0 P3C2AR=10000 P3C2ARNU=4.22% P3C2K=500.84% P3C2RNG=1000 OK. I just discovered that when I tried to paste an example of the extra characters into this reply, they were gone. They still show on my record sheet though. I'll describe what i'm seeing: When looking at the text in the cell, i see a verticle line one the end of each row of text. When looking at the formula bar with the cell selected I see a small box at the end of each row of text. Does this make any sense? "Jon Peltier" wrote: 1. Finish the formula with "P1C1ARNU" & "=" & Format(LP1C1ARNU, "0.0%") 2. For a new line, include the character vbNewLine: .... & vbNewLine & "P1C1ARNU" & "=" & LP1C1ARNU - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Gizmo" wrote in message ... Excel2003 I am using the following code to add a record to my collection page. Dim LP1C1ARNU As Double ... ... Range("D" & LRow - 1).Value = LComments1 & " " & LRun & " " & "P1C1AR" & "=" & LP1C1AR & " " & "P1C1ARNU" & "=" & LP1C1ARNU LP1C1ARNU is from another page in percent format, but shows up in the new cell as a Decimal.(ex P1C1ARNU=.157) How can I show it as Percentage?(ex P1C1ARNU=15.7%) I would also like to know how to add "alt enter" to the expression so I can line up the values in the cell. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pivottable: Show value as a percent of Subtotal | Excel Discussion (Misc queries) | |||
Show Percent changes | Charts and Charting in Excel | |||
How do you show percent changes with color shading? | Charts and Charting in Excel | |||
How do you show percent changes? | Charts and Charting in Excel | |||
How to calculate and then show up as a percent? | Excel Worksheet Functions |