Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic Comma 2

Status
Not open for further replies.

bobnplano

Technical User
Mar 25, 2003
52
US
I am using Excel 2000 in a Windows XP environment. I have a spreadsheet using two different sheets of the same workbook. When linking information from one sheet to another cell in the other sheet, is it possible to have Excel automatically enter a comma following the linked info?

Example: Cell info in sheet 1 is a city. Whereas, this city is automatically inserted into a cell in sheet 2. The cell following the linked cell in sheet 2 is the state. How can I have sheet 2 automatically enter the comma following the city so that when it is printed there will be a comma separating the city and state without entering the comma on sheet 1? All the information inserted in sheet 1 is copied from another spreadsheet and pasted on my spreadsheet. However, the text copied does not have the commas either.

Thanks in advance.

Bob
 
use & to concantonate, i.e.

=Sheet1!A1 & ", " & Sheet2!A1

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
You can also do it with the concatenate function such as :

=concatenate(Sheet1!A1,", ",Sheet2!A1)

droldog
 
GingerR, when I enter your suggestion (exactly as you have suggested) I get the following error message: "Microsoft Excel found an error in the formula you entered. Do you want to accept the correction proposed below?

='Inventory Template'!A1&""

To accept the correction, click Yes
To close this message and correct the formula yourself, click No

droldog, are you suggesting typing the word "contatenate" then "(" followed by "Inventory Template!A1,","? This doesn't seem to work either. What am I doing wrong?
 
You do not have a comma in between the quotation marks?

It works fine for me, so does Droldog's way, so I'm not sure what the problem is. It's a very simple function. Try searching HELP for "Concatenate".

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top