Concatenate Excel cell value from another sheet

2.5k Views Asked by At

I have just starting to use excel (to do something other than just open csv files)

I have Sheet1 and Sheet2. Sheet1!A1 is "1"

In Sheet2 A1 I would like to have

<myelement myattribute="1"/>

I have tried concatenating using & but it doesn't work.

1

There are 1 best solutions below

0
On BEST ANSWER

Please try the following formula

="<myelement myattribute="&char(34)&text(Sheet1!A1,"0")&char(34)&"/>"

  • Char(34) meaning "
  • Text(Number, Format) converts the number to a string