rhombus4
Well-known Member
- Joined
- May 26, 2010
- Messages
- 586
- Office Version
- 365
- 2016
- Platform
- Windows
I managed to get help to copy a sheet to a new book, however because the formulas contained indirect in them it gave a ref# errors
this is the formula it tries to copy
=IF(INDIRECT("'"&A1&"'!C5")="","",VLOOKUP(B$2,INDIRECT("'"&A1&"'!B2:D5"),2,0)) al the other formulas copy ok to the new book.
ALso what do I need to add if I want the new book to be called whatever is in cell A1 and not called New Book
Sheets("Sheet1").Copy
With ActiveSheet.UsedRange
.Value = .Value
End With
this is the formula it tries to copy
=IF(INDIRECT("'"&A1&"'!C5")="","",VLOOKUP(B$2,INDIRECT("'"&A1&"'!B2:D5"),2,0)) al the other formulas copy ok to the new book.
ALso what do I need to add if I want the new book to be called whatever is in cell A1 and not called New Book
Sheets("Sheet1").Copy
With ActiveSheet.UsedRange
.Value = .Value
End With