Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want a cell to equal the contents of another cell and then there to be a
little text after. For example, I want a cell to equal the contents of G4 and then for mg to be included in the cell after the value of what's in G4. This is what I have and it isn't working. wks_C.Range("A" & c).Value = "wks_S.Range("B" & s).Value mg" or I tried wks_C.Range("A" & c).Value = wks_S.Range("B" & s).Value mg Thank you |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Adam,
I am confused. You mention G4, but it is nowhere in the code.And what do you mean by '... and then for rng to be included..'? Do you mean the text rng, the address of range, the contents of range, or what? -- HTH ------- Bob Phillips "Adam" wrote in message ... I want a cell to equal the contents of another cell and then there to be a little text after. For example, I want a cell to equal the contents of G4 and then for mg to be included in the cell after the value of what's in G4. This is what I have and it isn't working. wks_C.Range("A" & c).Value = "wks_S.Range("B" & s).Value mg" or I tried wks_C.Range("A" & c).Value = wks_S.Range("B" & s).Value mg Thank you |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The G4 was just an example. I want a cell to equal the value that is in one
cell followed by a space and then the text mg. "Bob Phillips" wrote: Adam, I am confused. You mention G4, but it is nowhere in the code.And what do you mean by '... and then for rng to be included..'? Do you mean the text rng, the address of range, the contents of range, or what? -- HTH ------- Bob Phillips "Adam" wrote in message ... I want a cell to equal the contents of another cell and then there to be a little text after. For example, I want a cell to equal the contents of G4 and then for mg to be included in the cell after the value of what's in G4. This is what I have and it isn't working. wks_C.Range("A" & c).Value = "wks_S.Range("B" & s).Value mg" or I tried wks_C.Range("A" & c).Value = wks_S.Range("B" & s).Value mg Thank you |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Adam
Your second line is very close. You need to tell the system you want to concatenate the the string "mg" to the end of the value. wks_c.Range("A" & c).Value = wks_s.Range("B" & s).Value & "mg" Stan Shoemaker Palo Alto, CA "Adam" wrote: I want a cell to equal the contents of another cell and then there to be a little text after. For example, I want a cell to equal the contents of G4 and then for mg to be included in the cell after the value of what's in G4. This is what I have and it isn't working. wks_C.Range("A" & c).Value = "wks_S.Range("B" & s).Value mg" or I tried wks_C.Range("A" & c).Value = wks_S.Range("B" & s).Value mg Thank you |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I still do not understand what you mean by a text range, but let's try the
range address wks_C.Range("A" & c).Value = "wks_S.Range("B" & s).Value & " " & rng.address -- HTH ------- Bob Phillips "Adam" wrote in message ... The G4 was just an example. I want a cell to equal the value that is in one cell followed by a space and then the text mg. "Bob Phillips" wrote: Adam, I am confused. You mention G4, but it is nowhere in the code.And what do you mean by '... and then for rng to be included..'? Do you mean the text rng, the address of range, the contents of range, or what? -- HTH ------- Bob Phillips "Adam" wrote in message ... I want a cell to equal the contents of another cell and then there to be a little text after. For example, I want a cell to equal the contents of G4 and then for mg to be included in the cell after the value of what's in G4. This is what I have and it isn't working. wks_C.Range("A" & c).Value = "wks_S.Range("B" & s).Value mg" or I tried wks_C.Range("A" & c).Value = wks_S.Range("B" & s).Value mg Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can I make cell "yes" equal 1, "no" equal 0 | Excel Discussion (Misc queries) | |||
How to make text in a cell equal a number | Excel Discussion (Misc queries) | |||
How can I make an excel cell equal to the value of a frame object text box | Excel Worksheet Functions | |||
How can I make an excel cell equal to the value of a text box | Excel Worksheet Functions | |||
How do I make one cell equal to another | Excel Worksheet Functions |