Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a macro that is working to pull information from another file to
update cells but it is only linked to one file. I want to be able to name the file in cell A2 but the other information should stay the same as each file has the same format and sheet names. Range("c2").Select ActiveCell.FormulaR1C1 = "='[1776 CLO I Recon 011309 V 18.xls]Acct'!RC[-2]" C2 is the cell to be updated from file = 1776 CLO I Recon 011309 V 18.xls sheet Acct moving over 2 column's on that sheet. I want to put in cell A2 the name of the file = 1776 CLO I Recon 011309 V 18.xls and have my "ActiveCell.Formula" use that so I can change the name in cell a2 as I move to the next file. Any help would be appreciated |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Range("c2").FormulaR1C1 = "='[1776 CLO I Recon 011309 V 18.xls]Acct'!RC[-2]"
becomes with activesheet 'I like qualifying my ranges .Range("c2").FormulaR1C1 _ = "='[" & .range("A2").value & "]Acct'!RC[-2]" end with This assumes that the workbook (with the name in A2) is open, too. Don wrote: I have a macro that is working to pull information from another file to update cells but it is only linked to one file. I want to be able to name the file in cell A2 but the other information should stay the same as each file has the same format and sheet names. Range("c2").Select ActiveCell.FormulaR1C1 = "='[1776 CLO I Recon 011309 V 18.xls]Acct'!RC[-2]" C2 is the cell to be updated from file = 1776 CLO I Recon 011309 V 18.xls sheet Acct moving over 2 column's on that sheet. I want to put in cell A2 the name of the file = 1776 CLO I Recon 011309 V 18.xls and have my "ActiveCell.Formula" use that so I can change the name in cell a2 as I move to the next file. Any help would be appreciated -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Dave, this helps
"Dave Peterson" wrote: Range("c2").FormulaR1C1 = "='[1776 CLO I Recon 011309 V 18.xls]Acct'!RC[-2]" becomes with activesheet 'I like qualifying my ranges .Range("c2").FormulaR1C1 _ = "='[" & .range("A2").value & "]Acct'!RC[-2]" end with This assumes that the workbook (with the name in A2) is open, too. Don wrote: I have a macro that is working to pull information from another file to update cells but it is only linked to one file. I want to be able to name the file in cell A2 but the other information should stay the same as each file has the same format and sheet names. Range("c2").Select ActiveCell.FormulaR1C1 = "='[1776 CLO I Recon 011309 V 18.xls]Acct'!RC[-2]" C2 is the cell to be updated from file = 1776 CLO I Recon 011309 V 18.xls sheet Acct moving over 2 column's on that sheet. I want to put in cell A2 the name of the file = 1776 CLO I Recon 011309 V 18.xls and have my "ActiveCell.Formula" use that so I can change the name in cell a2 as I move to the next file. Any help would be appreciated -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pull data from a file | Excel Discussion (Misc queries) | |||
Can I pull data from worksheets with a batch file? | Excel Discussion (Misc queries) | |||
Personal macro file will not pull up when excel is started | Setting up and Configuration of Excel | |||
How can I pull data from a different file from within a formula? | Excel Discussion (Misc queries) | |||
How to pull data out of an excell file with multiple tabs | Excel Worksheet Functions |