Can cell get tab value

  • Thread starter Thread starter Wally
  • Start date Start date
W

Wally

Can a cell show the worksheet tab value?

My worksheet tab and my title cell in my worksheet must have the same
value. can one read the other so I only have to input the information
once?

Thanks

Wally
 
Hi Wally,
See my http://www.mvps.org/dmcritchie/excel/sheets.htm
page for questions on sheets
see my http://www.mvps.org/dmcritchie/excel/pathname.htm
page for questions on extracting pathname, workbook name, sheetname

VBA cell value gets worksheet tab value
range("a1") = application.activesheet.name

VBA worksheet tab gets cell value
ActiveSheet.Name = Range("a1")

you might also be interested in formatting with a date (with or w/o the prefix)
ActiveSheet.Name = "D" & Format(Date, "yyyymmdd")
ActiveSheet.Name = "D" & Format(Range("a1"), "yyyymmdd")
ActiveSheet.Name = "D" & Format(Range("a1"), "yyyy_mmdd_hhmm")

worksheet function cell value gets worksheet tab value
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
« The CELL formulas with "filename" will not work until the file has been saved (#VALUE! error).
 
and since you don't care which you change, you should be
changing the sheetname, because you can't have two sheets
with the same name so that would be the easiest way to go
and not have to worry about intercepting errors.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top