View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier Roger Govier is offline
external usenet poster
 
Posts: 2,886
Default Concatenate w/ name of sheet

A formula that will return the name of the sheet it in is this:
=RIGHT(CELL("filename"),LEN(CELL("filename"))-FIND("]",CELL("filename")))


With the proviso that file must have been saved first, for this to work.

--
Regards

Roger Govier


"JLatham" <HelpFrom @ Jlathamsite.com.(removethis) wrote in message
...
I hope you mean information from two cells, not two complete rows.
I'll go
on that premise:
A formula that will return the name of the sheet it in is this:
=RIGHT(CELL("filename"),LEN(CELL("filename"))-FIND("]",CELL("filename")))

To concatenate two or more values from cells you can use the
CONCATENATE()
function or do it another way. I'll show both. I will also presume
you wish
to have a dash (-) separating the items concatenated. That makes
things a
little easier to see and understand here. You can substitute anything
for
the dash including a space or just leave that part out of the
concatenation
completely.

Assume that you are in cell A2 and want to concatenate A1 and B1 along
with
the sheet name.
=CONCATENATE(A1,"-",B1,"-",RIGHT(CELL("filename"),LEN(CELL("filename"))-FIND("]",CELL("filename"))))
you can do the same thing without the CONCATENATE statement as:
=A1 & "-" & B1 & "-" &
RIGHT(CELL("filename"),LEN(CELL("filename"))-FIND("]",CELL("filename")))

Hope that helps reduce the frustration level a little.

"frustratedwthis" wrote:

Is there a way to concatenate 2 rows of information AND the name of
the sheet?
Thank you for your help in advance!