How to make a cell equal text

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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?
 
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.
 
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
 
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
 
Back
Top