Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default 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






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
can I make cell "yes" equal 1, "no" equal 0 can I make cell yes equal 1, no equa Excel Discussion (Misc queries) 4 April 22nd 23 06:09 AM
How to make text in a cell equal a number Dantron Excel Discussion (Misc queries) 6 April 4th 23 10:09 AM
How can I make an excel cell equal to the value of a frame object text box directionalman Excel Worksheet Functions 1 February 27th 06 09:24 PM
How can I make an excel cell equal to the value of a text box [email protected] Excel Worksheet Functions 5 February 27th 06 03:12 AM
How do I make one cell equal to another Deb Blackshaw Excel Worksheet Functions 2 December 20th 04 12:29 AM


All times are GMT +1. The time now is 10:03 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"