Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Creating copy of sheet into new file results in #REF errors

I am trying to copy of a worksheet into a new file but receive #REF errors on
the new workbook when I do. I believe the cause of the problem is the
following formula:

='21day wksht'!$F$3+(IF(ISERROR(VLOOKUP(B3,INDIRECT("'"&B3 72&"
Update'!$A$7:$L$43"),12)),VLOOKUP(OFFSET($B$369,-396,MATCH(1,$B$369:$V$369,0)-3,1,1),INDIRECT("'"&OFFSET($B$369,3,MATCH(1,$B$369 :$V$369,0)-3,1,1)&"
Update'!$A$7:$L$43"),12),VLOOKUP(B3,INDIRECT("'"&B 372&"
Update'!$A$7:$L$43"),12)))

Because of this formula, everything else based off of this cell becomes a
problem. Why does this happen? It's simply referencing everything back to the
old worksheet is it not? Plus, I designed the macro so do the following:

1. Create a copy of the sheet into a new file
2. In the new sheet (if things don't come up with these #REF errors), copy
paste special values.

Let me know if this a common mistake. Thanks so much for all your help in
advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default Creating copy of sheet into new file results in #REF errors

Its difficult to tell for sure what is happening in the formula without
seeing the entire worksheet you are using, however€¦

When you are using the Indirect() function to figure out what cells to use
in the Vlookup() function, the cells referenced must have a valid cell
address that could be used in the Vlookup.

Such as in one spot, you are doing a Vlookup of cell B3 in a range
determined by:
INDIRECT("'"&B372&" Update'!$A$7:$L$43")

So it follows that B372 would need to have a valid path/filename that can be
found from the current file. My hunch is that these are not returning valid
path/filename:Sheetname!cell references.

If that cell reference does not return the value correctly it would result
in a Reference error as you describe.

It might be helpful to use the Formula Auditing, Evaluate Formula feature to
slowly step through the execution of your formula and perhaps see where it is
going awry.

Hope that helps.

Frank Wood


"Sungibungi" wrote:

I am trying to copy of a worksheet into a new file but receive #REF errors on
the new workbook when I do. I believe the cause of the problem is the
following formula:

='21day wksht'!$F$3+(IF(ISERROR(VLOOKUP(B3,INDIRECT("'"&B3 72&"
Update'!$A$7:$L$43"),12)),VLOOKUP(OFFSET($B$369,-396,MATCH(1,$B$369:$V$369,0)-3,1,1),INDIRECT("'"&OFFSET($B$369,3,MATCH(1,$B$369 :$V$369,0)-3,1,1)&"
Update'!$A$7:$L$43"),12),VLOOKUP(B3,INDIRECT("'"&B 372&"
Update'!$A$7:$L$43"),12)))

Because of this formula, everything else based off of this cell becomes a
problem. Why does this happen? It's simply referencing everything back to the
old worksheet is it not? Plus, I designed the macro so do the following:

1. Create a copy of the sheet into a new file
2. In the new sheet (if things don't come up with these #REF errors), copy
paste special values.

Let me know if this a common mistake. Thanks so much for all your help in
advance.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Split text file into Excel sheet and separate the final results intoa new sheet Luciano Paulino da Silva Excel Worksheet Functions 8 April 18th 09 02:00 AM
Sort by Date and Copy results to another sheet Pat-UK New Users to Excel 6 March 17th 08 12:02 PM
creating a formula on one sheet that uses results of formulas on o gwendy Excel Worksheet Functions 3 March 14th 08 11:38 PM
copy formula when creating new sheet ASU Excel Discussion (Misc queries) 3 September 1st 06 09:58 PM
Unresolved Errors in IF Statements - Errors do not show in results Markthepain Excel Worksheet Functions 2 December 3rd 04 08:49 AM


All times are GMT +1. The time now is 08:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"