Actuarial Outpost
 
Go Back   Actuarial Outpost > Actuarial Discussion Forum > Software & Technology
FlashChat Actuarial Discussion Preliminary Exams CAS/SOA Exams Cyberchat Around the World Suggestions

Meet the Employees of DW Simpson
Patty Jacobsen Simpson, Bob Morand, Kristyn Sakelaris, Sean Loboda, KC Cho, Maureen Matous, Ellen Page
Aaron Benton, Becki Tobia, Kimberly Skora, Margit Vogele, Barclay Burns, Jason Blundy, Dan Karrow, Tom Troceen
Valorie Mulder, Marianne Westphal, Carol Lee, Jennifer Retford, Kieran Welsh-Phillips, Lindsey Nelson, Emily Paxton
Angie Wachholz, Derek Mulder, Julie Garwood, Caitlin Cunningham, David Benton, Dave Retford, Sarah Cleveland, Rhonda Glick
Genevieve Shannon, Meghan Bautista, Carol Datu, Barb Rave, Jesus Perez, Dan Kane, Chris Zdenek, Scott Simon, Kriss Wells


Reply
 
Thread Tools Display Modes
  #1  
Old 04-24-2006, 04:49 PM
mlschop's Avatar
mlschop mlschop is offline
Member
SOA
 
Join Date: Sep 2005
Posts: 29,339
Default Text-Based Reference (indirect?)

Here's the deal:

I have two spreadsheets - report and data. The report needs to pull appropriate data from the data spreadsheet. The data spreadsheet has multiple worksheets (tabs), labelled numerically - 1, 2, 3, etc.).

The report contains a column that includes the worksheet reference to data. Is there a way be able to write a formula so that I can just reference this column to pull from the correct worksheet?

I tried using indirect, and it didn't work (assuming maybe it can't work outside a single sheet). Any suggestions?

This is what I tried:

Cell A1 contains the worksheet reference - B1 contains the cell in the data worksheet i'm looking to pull over.

=indirect("'C:\Documents and Settings\username\Desktop\[data.xls]"&A1&"'!$B$1")
__________________

Reply With Quote
  #2  
Old 04-24-2006, 06:12 PM
mlschop's Avatar
mlschop mlschop is offline
Member
SOA
 
Join Date: Sep 2005
Posts: 29,339
Default

ok - i got indirect to work...but it will only work with the destination, "data", workbook open. as soon as i close it, i get #REF errors. anyway to get functionality with a closed worksheet?
__________________

Reply With Quote
  #3  
Old 04-24-2006, 06:36 PM
Brad Gile's Avatar
Brad Gile Brad Gile is offline
Member
CAS SOA AAA
 
Join Date: Sep 2001
Studying for whatever I feel like
College: Alumnus of Brown and UW-Madison
Posts: 11,109
Default

Quote:
Originally Posted by mlschop
ok - i got indirect to work...but it will only work with the destination, "data", workbook open. as soon as i close it, i get #REF errors. anyway to get functionality with a closed worksheet?
If you want to use data in a closed workbook, you have to establish a link to it. Strong advice: DO NOT DO THIS! Links are inherently evil. If you do, you just ask for major trouble later on. Instead, keep what you have using the INDIRECT function, but put code in the Workbook_Open event of ThisWorkbook in your work book that automatically opens the workbook you want to use data from.



Brad
__________________
Brad Gile, FSA, MAAA
Affiliate Member of the CAS
Dedicated Retired Actuary

Spoiler:
Obama sucks and we all know it-TDA


Spoiler:

That's been the funniest subplot of this whole thing, the people on the left attacking this bill for not being even more of a steaming pile. - erosewater
Reply With Quote
  #4  
Old 04-24-2006, 06:51 PM
Random Poster's Avatar
Random Poster Random Poster is offline
Member
CAS
 
Join Date: Aug 2005
Studying for nothing!
Posts: 2,533
Default

You could use the GetValue function. However, it cannot be used in a worksheet formula. You could create a VBA routine to grab the values and then put the values in the desired cells.


HTH,
RP
__________________
Surprisingly, not a mute.
Reply With Quote
  #5  
Old 04-24-2006, 08:04 PM
Emily Emily is offline
Member
 
Join Date: Jan 2003
Location: Oakland
Posts: 5,127
Default

Why do you want the workbook to be closed? If you want data from a workbook, what's wrong with having to have the workbook open? I've always thought of it as a nice feature. It forces you to know where your data is coming from.
Reply With Quote
  #6  
Old 04-24-2006, 10:23 PM
Old Timer's Avatar
Old Timer Old Timer is offline
Member
SOA AAA
 
Join Date: Sep 2001
Location: The Great East
Posts: 1,559
Default

INDIRECT.EXT from the MOREFUNC.XLL add-in
__________________
Life is chaos personified.
Reply With Quote
  #7  
Old 04-25-2006, 08:40 AM
mlschop's Avatar
mlschop mlschop is offline
Member
SOA
 
Join Date: Sep 2005
Posts: 29,339
Default

Quote:
Originally Posted by Old Timer
INDIRECT.EXT from the MOREFUNC.XLL add-in
is the MOREFUNC.XLL add-in available via microsofts homepage as a download or something?
__________________

Reply With Quote
  #8  
Old 04-26-2006, 11:06 AM
Old Timer's Avatar
Old Timer Old Timer is offline
Member
SOA AAA
 
Join Date: Sep 2001
Location: The Great East
Posts: 1,559
Default

Try here.

It is not from MS.
__________________
Life is chaos personified.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -4. The time now is 06:14 AM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
*PLEASE NOTE: Posts are not checked for accuracy, and do not
represent the views of the Actuarial Outpost or its sponsors.
Page generated in 0.27490 seconds with 7 queries