How to make a cell equal text

G

Guest

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
 
B

Bob Phillips

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?
 
G

Guest

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.
 
G

Guest

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
 
B

Bob Phillips

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top