Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Every two weeks I have a Business Objects query set on a scheduler to
refresh. It then saves to an Excel file in a defined location named like SICK_10_15_06.xls. That file contains the most current list of employees and their available sick hours. Every 2 weeks this query refreshes and saves a new file with the most current data such as SICK_10_29_06.xls. I have in addition another excel file that has multiple VLOOKUP formulas that link to the above mentioned file in order to pull in the employee name and sick hours available. My question is how can I get my VLOOKUP formula to link to the most current excel file? Initially it would be linked to SICK_10_15_06.xls, but when SICK_10_29_06.xls is created, I want my VLOOKUP to switch to that file. Any ideas on how to get there? Thanks! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In your vLookup workbook, change all of your lookup formulas to
reference a single cell. That cell will have the most recent workbook name/path in it. In the vLookup workbook open event, add code to search the folder containing the Sick workbooks and return the most recent file. Have the code add that file name/path to the cell established above. John Walkenbach has some code to find the latest file in a folder here... http://j-walk.com/ss/excel/tips/tip97.htm Personally, I prefer file search code using the File System Object. -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "TimN" wrote in message Every two weeks I have a Business Objects query set on a scheduler to refresh. It then saves to an Excel file in a defined location named like SICK_10_15_06.xls. That file contains the most current list of employees and their available sick hours. Every 2 weeks this query refreshes and saves a new file with the most current data such as SICK_10_29_06.xls. I have in addition another excel file that has multiple VLOOKUP formulas that link to the above mentioned file in order to pull in the employee name and sick hours available. My question is how can I get my VLOOKUP formula to link to the most current excel file? Initially it would be linked to SICK_10_15_06.xls, but when SICK_10_29_06.xls is created, I want my VLOOKUP to switch to that file. Any ideas on how to get there? Thanks! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Evening Tim,
I am not sure of the easiest way to re-reference your spreadsheets, BUT... Why don't you have the reference set to SICK_CURRENT and have your scheduler create 2 copies, one with the date and the other called SICK_CURRENT? HTH Simon TimN wrote: Every two weeks I have a Business Objects query set on a scheduler to refresh. It then saves to an Excel file in a defined location named like SICK_10_15_06.xls. That file contains the most current list of employees and their available sick hours. Every 2 weeks this query refreshes and saves a new file with the most current data such as SICK_10_29_06.xls. I have in addition another excel file that has multiple VLOOKUP formulas that link to the above mentioned file in order to pull in the employee name and sick hours available. My question is how can I get my VLOOKUP formula to link to the most current excel file? Initially it would be linked to SICK_10_15_06.xls, but when SICK_10_29_06.xls is created, I want my VLOOKUP to switch to that file. Any ideas on how to get there? Thanks! -- -------------------- Simon - UK Email at simon22mports [ a t ] hot mail [ d ot ]com Message posted via http://www.officekb.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Great Minds think alike! :O
Gary Brown "smw226 via OfficeKB.com" wrote: Evening Tim, I am not sure of the easiest way to re-reference your spreadsheets, BUT... Why don't you have the reference set to SICK_CURRENT and have your scheduler create 2 copies, one with the date and the other called SICK_CURRENT? HTH Simon TimN wrote: Every two weeks I have a Business Objects query set on a scheduler to refresh. It then saves to an Excel file in a defined location named like SICK_10_15_06.xls. That file contains the most current list of employees and their available sick hours. Every 2 weeks this query refreshes and saves a new file with the most current data such as SICK_10_29_06.xls. I have in addition another excel file that has multiple VLOOKUP formulas that link to the above mentioned file in order to pull in the employee name and sick hours available. My question is how can I get my VLOOKUP formula to link to the most current excel file? Initially it would be linked to SICK_10_15_06.xls, but when SICK_10_29_06.xls is created, I want my VLOOKUP to switch to that file. Any ideas on how to get there? Thanks! -- -------------------- Simon - UK Email at simon22mports [ a t ] hot mail [ d ot ]com Message posted via http://www.officekb.com |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Simon,
Thanks for the suggestion. let me toss out one more thing just for ideas on how to handle this. I like the idea of linking to SICK_Current.xls. That keeps the most current data attached to the file via the VLOOKUP formulas. The problem I still face is when someone has to go back to a prior period to make a correction to the sick time calculation, they would need to have the sick data as of that payroll period (a period from past history, not the current period's data), i.e SICK_10_15_06.xls for example. Any suggestions on how to overcome that issue? Thanks for any thoughts. Tim "smw226 via OfficeKB.com" wrote: Evening Tim, I am not sure of the easiest way to re-reference your spreadsheets, BUT... Why don't you have the reference set to SICK_CURRENT and have your scheduler create 2 copies, one with the date and the other called SICK_CURRENT? HTH Simon TimN wrote: Every two weeks I have a Business Objects query set on a scheduler to refresh. It then saves to an Excel file in a defined location named like SICK_10_15_06.xls. That file contains the most current list of employees and their available sick hours. Every 2 weeks this query refreshes and saves a new file with the most current data such as SICK_10_29_06.xls. I have in addition another excel file that has multiple VLOOKUP formulas that link to the above mentioned file in order to pull in the employee name and sick hours available. My question is how can I get my VLOOKUP formula to link to the most current excel file? Initially it would be linked to SICK_10_15_06.xls, but when SICK_10_29_06.xls is created, I want my VLOOKUP to switch to that file. Any ideas on how to get there? Thanks! -- -------------------- Simon - UK Email at simon22mports [ a t ] hot mail [ d ot ]com Message posted via http://www.officekb.com |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That certainly would work. I was trying to come up with a more systematic
way to do it so the group of users who are not too sophisticated, won't have to go in and manipulate the data files. TKN "Gary Brown" wrote: Re-save 'SICK_10_15_06.xls' as 'SICK_Current.xls'. -- HTH, Gary Brown If this post was helpful to you, please select ''YES'' at the bottom of the post. "TimN" wrote: Simon, Thanks for the suggestion. let me toss out one more thing just for ideas on how to handle this. I like the idea of linking to SICK_Current.xls. That keeps the most current data attached to the file via the VLOOKUP formulas. The problem I still face is when someone has to go back to a prior period to make a correction to the sick time calculation, they would need to have the sick data as of that payroll period (a period from past history, not the current period's data), i.e SICK_10_15_06.xls for example. Any suggestions on how to overcome that issue? Thanks for any thoughts. Tim "smw226 via OfficeKB.com" wrote: Evening Tim, I am not sure of the easiest way to re-reference your spreadsheets, BUT... Why don't you have the reference set to SICK_CURRENT and have your scheduler create 2 copies, one with the date and the other called SICK_CURRENT? HTH Simon TimN wrote: Every two weeks I have a Business Objects query set on a scheduler to refresh. It then saves to an Excel file in a defined location named like SICK_10_15_06.xls. That file contains the most current list of employees and their available sick hours. Every 2 weeks this query refreshes and saves a new file with the most current data such as SICK_10_29_06.xls. I have in addition another excel file that has multiple VLOOKUP formulas that link to the above mentioned file in order to pull in the employee name and sick hours available. My question is how can I get my VLOOKUP formula to link to the most current excel file? Initially it would be linked to SICK_10_15_06.xls, but when SICK_10_29_06.xls is created, I want my VLOOKUP to switch to that file. Any ideas on how to get there? Thanks! -- -------------------- Simon - UK Email at simon22mports [ a t ] hot mail [ d ot ]com Message posted via http://www.officekb.com |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tim,
What I am thinking is.... auto_exec macro on the file which scans a given folder and lists all files on a hidden tab. Combo Box driven by this list. VLookups driven by value of Combo List That said, could this data be put into access as this would solve all your issues, allow you to keep an audit log of people's actions and , if programmed correctly, allow you to easilly restore data if changes are made in error. One thing I have learned, the hard way, is you want to give the minimum of people access to amend your data and, where you do, you want to keep detailed audit trails of thier actions. HTH Simoin TimN wrote: That certainly would work. I was trying to come up with a more systematic way to do it so the group of users who are not too sophisticated, won't have to go in and manipulate the data files. TKN Re-save 'SICK_10_15_06.xls' as 'SICK_Current.xls'. [quoted text clipped - 41 lines] Thanks! -- -------------------- Simon - UK Email at simon22mports [ a t ] hot mail [ d ot ]com Message posted via http://www.officekb.com |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Or same a copy of sick_10_15_06.xls to 'SICK.xls' and have all vlookups
reference Sick.xls -- HTH, Gary Brown If this post was helpful to you, please select ''YES'' at the bottom of the post. "TimN" wrote: Every two weeks I have a Business Objects query set on a scheduler to refresh. It then saves to an Excel file in a defined location named like SICK_10_15_06.xls. That file contains the most current list of employees and their available sick hours. Every 2 weeks this query refreshes and saves a new file with the most current data such as SICK_10_29_06.xls. I have in addition another excel file that has multiple VLOOKUP formulas that link to the above mentioned file in order to pull in the employee name and sick hours available. My question is how can I get my VLOOKUP formula to link to the most current excel file? Initially it would be linked to SICK_10_15_06.xls, but when SICK_10_29_06.xls is created, I want my VLOOKUP to switch to that file. Any ideas on how to get there? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
Modification in the CODE to HIDE rows and columns that start with ZERO (code given) | Excel Programming | |||
Excel code convert to Access code - Concat & eliminate duplicates | Excel Programming | |||
stubborn Excel crash when editing code with code, one solution | Excel Programming |