Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 62
Default displaying text & variable information in cell

I have two variables taken from textboxes on a userform: XPosVariance
& XNegVariance

I want to have them displayed in a cell when clicking done on the
userform such that the cell reads:

+5/-8

(In the case that XPosVariance = 5 and XNegVariance = 8).

I have this:

Sheets("΄£₯X₯Ξ").Cells(SokuteiItemRow, SokuteiItemColumn + 2).Value = "+"
& (XPosVariance) & "/-" (XNegVariance)

But it doesn't work. I'm sure the variables are fine because as a
test I just wrote = "TEST" and I get "TEST" written in the correct
spot. Any way I can do the above? I have a feeling this isn't a
tough question, I just don't know how to do it.

Thankx.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default displaying text & variable information in cell

Maybe this
Sheets("???").Cells(SokuteiItemRow, SokuteiItemColumn + 2).Value = _
Format("+" & (XPosVariance) & "/-" & (XNegVariance), "@")

"pallaver" wrote:

I have two variables taken from textboxes on a userform: XPosVariance
& XNegVariance

I want to have them displayed in a cell when clicking done on the
userform such that the cell reads:

+5/-8

(In the case that XPosVariance = 5 and XNegVariance = 8).

I have this:

Sheets("提出用").Cells(SokuteiItemRow, SokuteiItemColumn + 2).Value = "+"
& (XPosVariance) & "/-" (XNegVariance)

But it doesn't work. I'm sure the variables are fine because as a
test I just wrote = "TEST" and I get "TEST" written in the correct
spot. Any way I can do the above? I have a feeling this isn't a
tough question, I just don't know how to do it.

Thankx.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 62
Default displaying text & variable information in cell

BAM! On the money.

Sorry for the ???, I'm working on macros in Japan, thus have sheet
names in Japanese which probably don't convert. This site is a
lifesaver since it's really hard to figure out the help function
entirely in Japanese.

One question though, why is "@" necessary at the end? I wonder if it
works without it.

Thanks.


On 7$B7n(B1$BF|(B, $B8aA0(B9:34, Mike wrote:
Maybe this
Sheets("???").Cells(SokuteiItemRow, SokuteiItemColumn + 2).Value = _
Format("+" & (XPosVariance) & "/-" & (XNegVariance), "@")



"pallaver" wrote:
I have two variables taken from textboxes on a userform: XPosVariance
& XNegVariance


I want to have them displayed in a cell when clicking done on the
userform such that the cell reads:


+5/-8


(In the case that XPosVariance = 5 and XNegVariance = 8).


I have this:


Sheets("$BDs=PMQ(B").Cells(SokuteiItemRow, SokuteiItemColumn + 2).Value = "+"
& (XPosVariance) & "/-" (XNegVariance)


But it doesn't work. I'm sure the variables are fine because as a
test I just wrote = "TEST" and I get "TEST" written in the correct
spot. Any way I can do the above? I have a feeling this isn't a
tough question, I just don't know how to do it.


Thankx.- $B0zMQ%F%-%9%H$rI=<($7$J$$(B -


- $B0zMQ%F%-%9%H$rI=<((B -


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default displaying text & variable information in cell

If you record a macro formatting a cell to text. That is what it records. "@"
Try it.
"pallaver" wrote:

BAM! On the money.

Sorry for the ???, I'm working on macros in Japan, thus have sheet
names in Japanese which probably don't convert. This site is a
lifesaver since it's really hard to figure out the help function
entirely in Japanese.

One question though, why is "@" necessary at the end? I wonder if it
works without it.

Thanks.


On 7月1ζ—₯, εˆε‰9:34, Mike wrote:
Maybe this
Sheets("???").Cells(SokuteiItemRow, SokuteiItemColumn + 2).Value = _
Format("+" & (XPosVariance) & "/-" & (XNegVariance), "@")



"pallaver" wrote:
I have two variables taken from textboxes on a userform: XPosVariance
& XNegVariance


I want to have them displayed in a cell when clicking done on the
userform such that the cell reads:


+5/-8


(In the case that XPosVariance = 5 and XNegVariance = 8).


I have this:


Sheets("提出用").Cells(SokuteiItemRow, SokuteiItemColumn + 2).Value = "+"
& (XPosVariance) & "/-" (XNegVariance)


But it doesn't work. I'm sure the variables are fine because as a
test I just wrote = "TEST" and I get "TEST" written in the correct
spot. Any way I can do the above? I have a feeling this isn't a
tough question, I just don't know how to do it.


Thankx.- 引用テγ‚*γ‚Ήγƒˆγ‚’θ‘¨η€Ίγ—γͺい -


- 引用テγ‚*γ‚Ήγƒˆγ‚’θ‘¨η€Ί -



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default displaying text & variable information in cell

And yes it will work with out it.

"pallaver" wrote:

BAM! On the money.

Sorry for the ???, I'm working on macros in Japan, thus have sheet
names in Japanese which probably don't convert. This site is a
lifesaver since it's really hard to figure out the help function
entirely in Japanese.

One question though, why is "@" necessary at the end? I wonder if it
works without it.

Thanks.


On 7月1ζ—₯, εˆε‰9:34, Mike wrote:
Maybe this
Sheets("???").Cells(SokuteiItemRow, SokuteiItemColumn + 2).Value = _
Format("+" & (XPosVariance) & "/-" & (XNegVariance), "@")



"pallaver" wrote:
I have two variables taken from textboxes on a userform: XPosVariance
& XNegVariance


I want to have them displayed in a cell when clicking done on the
userform such that the cell reads:


+5/-8


(In the case that XPosVariance = 5 and XNegVariance = 8).


I have this:


Sheets("提出用").Cells(SokuteiItemRow, SokuteiItemColumn + 2).Value = "+"
& (XPosVariance) & "/-" (XNegVariance)


But it doesn't work. I'm sure the variables are fine because as a
test I just wrote = "TEST" and I get "TEST" written in the correct
spot. Any way I can do the above? I have a feeling this isn't a
tough question, I just don't know how to do it.


Thankx.- 引用テγ‚*γ‚Ήγƒˆγ‚’θ‘¨η€Ίγ—γͺい -


- 引用テγ‚*γ‚Ήγƒˆγ‚’θ‘¨η€Ί -





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 62
Default displaying text & variable information in cell

I know how to record a macro, but don't know how to record one
formatting a cell to text. What would I type in the cell when the
macro is recording?

--- MIKE WROTE ---
If you record a macro formatting a cell to text. That is what it
records. "@" Try it.


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default displaying text & variable information in cell

Just right-click on a cell. Select Format Cells... Select Text as the format.
Thats it.

"pallaver" wrote:

I know how to record a macro, but don't know how to record one
formatting a cell to text. What would I type in the cell when the
macro is recording?

--- MIKE WROTE ---
If you record a macro formatting a cell to text. That is what it
records. "@" Try it.



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default displaying text & variable information in cell

In looking at the code line, I don't see why the Format function call is
needed at all... it looks like a simple concatenation and cell assignment to
me.

To the OP.... does this modified statement work also?

Sheets("???").Cells(SokuteiItemRow, SokuteiItemColumn + 2).Value = _
"+" & XPosVariance & "/-" & XNegVariance

Rick


"Mike" wrote in message
...
And yes it will work with out it.

"pallaver" wrote:

BAM! On the money.

Sorry for the ???, I'm working on macros in Japan, thus have sheet
names in Japanese which probably don't convert. This site is a
lifesaver since it's really hard to figure out the help function
entirely in Japanese.

One question though, why is "@" necessary at the end? I wonder if it
works without it.

Thanks.


On 7月1ζ—₯, εˆε‰9:34, Mike wrote:
Maybe this
Sheets("???").Cells(SokuteiItemRow, SokuteiItemColumn + 2).Value = _
Format("+" & (XPosVariance) & "/-" & (XNegVariance), "@")



"pallaver" wrote:
I have two variables taken from textboxes on a userform: XPosVariance
& XNegVariance

I want to have them displayed in a cell when clicking done on the
userform such that the cell reads:

+5/-8

(In the case that XPosVariance = 5 and XNegVariance = 8).

I have this:

Sheets("提出用").Cells(SokuteiItemRow, SokuteiItemColumn + 2).Value =
"+"
& (XPosVariance) & "/-" (XNegVariance)

But it doesn't work. I'm sure the variables are fine because as a
test I just wrote = "TEST" and I get "TEST" written in the correct
spot. Any way I can do the above? I have a feeling this isn't a
tough question, I just don't know how to do it.

Thankx.- 引用テγ‚*γ‚Ήγƒˆγ‚’θ‘¨η€Ίγ—γͺい -

- 引用テγ‚*γ‚Ήγƒˆγ‚’θ‘¨η€Ί -




  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 62
Default displaying text & variable information in cell

Nope, sorry Rick. That doesn't work. I get an error. I tried adding
parenthesis around the variables as well, but similar to above, NG.

I'm stuck on my macro now on some execution error 13, non-agreement
with bodies.... argh...

On 7$B7n(B1$BF|(B, $B8a8e(B12:53, "Rick Rothstein \(MVP - VB\)"
wrote:
In looking at the code line, I don't see why the Format function call is
needed at all... it looks like a simple concatenation and cell assignment to
me.

To the OP.... does this modified statement work also?

Sheets("???").Cells(SokuteiItemRow, SokuteiItemColumn + 2).Value = _
"+" & XPosVariance & "/-" & XNegVariance

Rick

  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default displaying text & variable information in cell

You never shared what those row and column values were.

I'd use one of these just to make sure that the value is treated like text.

Later, if you edit that cell (that's formatted as General), you may find that
your text expression has changed to a formula. And I don't know if you want
that.

Sheets("Sheet1").Cells(SokuteiItemRow, SokuteiItemColumn + 2).Value _
= "'+" & XPosVariance & "/-" & xNegVariance

(notice the apostrophe in front of the plus)

or

with Sheets("Sheet1").Cells(SokuteiItemRow, SokuteiItemColumn + 2)
.numberformat = "@" 'text
.Value = "+" & XPosVariance & "/-" & xNegVariance
end with



pallaver wrote:

Nope, sorry Rick. That doesn't work. I get an error. I tried adding
parenthesis around the variables as well, but similar to above, NG.

I'm stuck on my macro now on some execution error 13, non-agreement
with bodies.... argh...

On 7$B7n(B1$BF|(B, $B8a8e(B12:53, "Rick Rothstein \(MVP - VB\)"
wrote:
In looking at the code line, I don't see why the Format function call is
needed at all... it looks like a simple concatenation and cell assignment to
me.

To the OP.... does this modified statement work also?

Sheets("???").Cells(SokuteiItemRow, SokuteiItemColumn + 2).Value = _
"+" & XPosVariance & "/-" & XNegVariance

Rick


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
displaying text in a cell if a another cell falls in a range THIRDCOAST Excel Worksheet Functions 2 February 1st 08 06:24 PM
Full text in a cell is not displaying or wrapping CellBug Excel Discussion (Misc queries) 0 October 25th 06 04:21 PM
Text in formula bar is not displaying in cell Raquel8D Excel Discussion (Misc queries) 1 August 29th 05 10:31 PM
Text in formula bar is not displaying in cell Mike Excel Discussion (Misc queries) 0 August 29th 05 09:47 PM
Text not all displaying in a cell, what is max that can be inserted? Althea Excel Worksheet Functions 4 May 9th 05 02:41 AM


All times are GMT +1. The time now is 07:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"