Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Chas
 
Posts: n/a
Default Advanced formula/inserting text question

I need help if it is possible. I have 4 workbooks that each contain 36
sheets named 01,02, thru 36. Each sheet is identical layout, just
unique data. Each book is named by year, 2003,2004,2005,2006. I have a
report page that I use to lookup data that I need to change once a
week. The lookup data could be on any of the sheets within anyone of
the books. I am using the following to find the information I need in
one of the cells.

=IF(ISERROR(VLOOKUP($B$4,'[2005.xls]33'!$D$7:$K$49,5,FALSE)),"0",VLOOKUP($B$4,'[2005.xls]33'!$D$7:$K$49,5,FALSE))

There are about 30 different occurrences like the above only the sheet
changes every week. Is there a way that I can replace the
'[2005.xls]33' in the above formula to look at another sheet / cell,
where all I have to do is change one cell each time. That way each week
I only need to change 6 cells. If I can get this to work I can refine
what I am looking for based on other sheets, I just don't want to
change all the formulas each week.

Thanks in advance and if I need to clarify what I am doing please let
me know.

Chas

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Niek Otten
 
Posts: n/a
Default Advanced formula/inserting text question

Hi Chas,

Look in HELP for the INDIRECT() function

--
Kind regards,

Niek Otten

"Chas" wrote in message ups.com...
I need help if it is possible. I have 4 workbooks that each contain 36
sheets named 01,02, thru 36. Each sheet is identical layout, just
unique data. Each book is named by year, 2003,2004,2005,2006. I have a
report page that I use to lookup data that I need to change once a
week. The lookup data could be on any of the sheets within anyone of
the books. I am using the following to find the information I need in
one of the cells.

=IF(ISERROR(VLOOKUP($B$4,'[2005.xls]33'!$D$7:$K$49,5,FALSE)),"0",VLOOKUP($B$4,'[2005.xls]33'!$D$7:$K$49,5,FALSE))

There are about 30 different occurrences like the above only the sheet
changes every week. Is there a way that I can replace the
'[2005.xls]33' in the above formula to look at another sheet / cell,
where all I have to do is change one cell each time. That way each week
I only need to change 6 cells. If I can get this to work I can refine
what I am looking for based on other sheets, I just don't want to
change all the formulas each week.

Thanks in advance and if I need to clarify what I am doing please let
me know.

Chas



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Chas
 
Posts: n/a
Default Advanced formula/inserting text question

Thank you for your reply, but I have looked thru that and no matter how
I try it I get the you have an error in your formula popup. Could you
be so kind to show me what I may be missing. using the above lookup
without the if and iserror is fine, I will add all that once I get the
formula to work. The cell B 200 is on sheet reports and is in the
woorkbook weekly.

Thanks again
Chas

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
broro183
 
Posts: n/a
Default Advanced formula/inserting text question


Hi Chas,
Firstly, I would enter the vlookup formula in a column & refer to that
column in your if statement, this means that the vlookup which can slow
a spreadsheet's calculation dramatically (if used a lot) is only
calculated once rather than twice as it would in your current if
statement when there is no error. The vlookup column can then be hidden
from view.

Secondly, this is a quote from somewhere?!
"You could put the name of the source file (2005FebB.xls) in a cell in
the current worksheet (D5, for example) and replace the above
expression with one like this:
=INDIRECT("[" & D5 & "]Sheet1!B3")
Changing the contents of cell D5 to a different filename will make
that file the new source of data. There are a couple of "gottchas,"
however. First of all, you need to *manually open the file that is the
target* of the link; Excel won't do it for you as it would with a
regular link. Also, workbook filenames that contain spaces will trip
up the INDIRECT formula. If you think you might have spaces in your
filenames, you should change the formula to this:
=INDIRECT("'["&D5&"']Sheet1!B3")
"
To apply it in your situation try:
=IF(ISERROR(VLOOKUP(Master!$B$4,indirect("'["&$B$1&".xls]"&$C$1&"'!$D$7:$K$49"),5,FALSE)),"0",VLOOKUP(Maste r!$B$4,'[2005.xls]33'!$D$7:$K$49,5,FALSE))

To put this together:
B1 = filename (without the ".xls" ending)
c1 = sheetname
d1 =
VLOOKUP($B$4,indirect("'["&$B$1&".xls]"&$C$1&"'!$D$7:$K$49"),5,FALSE)
e1 = if(isna(d1),"0",d1)

nb: I have used isna rather than iserror as NA# is the result when data
is not found while other errors occur for different reasons (check out
help on vlookup).
Change the cell references etc as needed.

hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience...


--
broro183
------------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068
View this thread: http://www.excelforum.com/showthread...hreadid=522052

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Chas
 
Posts: n/a
Default Advanced formula/inserting text question

Thanks broro183 I figured it out.

I was close, I just had a [ in the wrong place somehow.

Works like a charm.

Chas



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
broro183
 
Posts: n/a
Default Advanced formula/inserting text question


Hi Chas,
Awesome - "working like a charm" is exactly what's wanted :-)

Rob Brockett
NZ
Always learning & the best way to learn is to experience...


--
broro183
------------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068
View this thread: http://www.excelforum.com/showthread...hreadid=522052

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
Stop excel from dropping the 0 in the beginning of a number? Rosewood Setting up and Configuration of Excel 12 April 4th 23 02:12 PM
Advanced filtering on text and blanks dtencza Excel Discussion (Misc queries) 4 March 14th 06 01:07 AM
user form question: text box to display result BigPig Excel Discussion (Misc queries) 0 February 28th 06 12:33 AM
advanced filter won't allow me to filter on bracketed text (-456.2 LucianoG Excel Discussion (Misc queries) 1 December 6th 04 08:38 PM
Advanced Window Split & Freeze Question Andrew Excel Worksheet Functions 1 November 8th 04 01:50 AM


All times are GMT +1. The time now is 08:50 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"