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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use a variable in a string

Status
Not open for further replies.
Oct 6, 2002
60
US
I have 2 columns, one with a number and the other with a string, I need to be able to take the number from one column and insert it in the string located in the other column. Any help would be greately appreciated. following is an example.

column1 Column2
365 there [variable] days in a year
12 There are [variable] months in a year
30 There are [variable] days in a month
 
To concatenate strings and cell references ( or variables ), use the CONCATENATE function, or use the concatenate symbol, like this:

="There are "&A1&" days in a year."

where cell A1 contains the value 365.

Cheers, Glenn.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top