![]() |
How to make a cell equal text
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 |
How to make a cell equal text
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 |
How to make a cell equal text
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 |
How to make a cell equal text
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 |
How to make a cell equal text
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 |
All times are GMT +1. The time now is 10:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com