Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I hope this is an easy question to answer...
I am attempting to use a SUMIF to pull in numbers from a separate timesheet and I would like to build part of the external reference workbook name from a cell instead of hard-coding it. For example: =SUMIF('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22,C6,'[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22) I have a cell with the resource name and I would like to plug in the name from that cell for €œFirstName_LastName€ but I cant seem to get that to work. Any thoughts? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You've got a couple of obstacles to overcome.
First... What you'd want to use is =indirect() and build a formula that results in the string that points at the folder, file, sheet, location. But the bad thing is that =indirect() won't work if that sending file is closed. If that's a problem, then Laurent Longre has an addin (morefunc.xll) at: http://xcell05.free.fr/ or http://xcell05.free.fr/morefunc/english/index.htm That includes =indirect.ext() that may help you. Second... =sumif() will return an error if the workbook is closed. You could replace it with =sumproduct() =sumproduct(--('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22=C6), ('[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22)) But you'd still may have to overcome the closed workbook problem. ps. You can't use the entire column in the =sumproduct() formula unless you're using xl2007. Nancy Taylor wrote: I hope this is an easy question to answer... I am attempting to use a SUMIF to pull in numbers from a separate timesheet and I would like to build part of the external reference workbook name from a cell instead of hard-coding it. For example: =SUMIF('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22,C6,'[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22) I have a cell with the resource name and I would like to plug in the name from that cell for €œFirstName_LastName€ but I cant seem to get that to work. Any thoughts? -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Dave,
I haven't used the Indirect function before so I've been playing with it to see how it works. I've been able to get the SUMIF statement built but I am getting that annoying #REF! error. I do have the workbook that I am referencing open and I have used the debug to step into the formula to make sure everything is resolving correctly. Looks OK but I can't get it to work. In case you can spot something easy that I can fix, here's my new formula: =INDIRECT("SUMIF('["&$D$6&".xlsx]Weekly Timesheet'!$L$2:$L$19,"&C6&",'["&$D$6&".xlsx]Weekly Timesheet'!$J$2:$J$19)") I'll keep trying... Thanks for the tip! Nancy "Dave Peterson" wrote: You've got a couple of obstacles to overcome. First... What you'd want to use is =indirect() and build a formula that results in the string that points at the folder, file, sheet, location. But the bad thing is that =indirect() won't work if that sending file is closed. If that's a problem, then Laurent Longre has an addin (morefunc.xll) at: http://xcell05.free.fr/ or http://xcell05.free.fr/morefunc/english/index.htm That includes =indirect.ext() that may help you. Second... =sumif() will return an error if the workbook is closed. You could replace it with =sumproduct() =sumproduct(--('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22=C6), ('[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22)) But you'd still may have to overcome the closed workbook problem. ps. You can't use the entire column in the =sumproduct() formula unless you're using xl2007. Nancy Taylor wrote: I hope this is an easy question to answer... I am attempting to use a SUMIF to pull in numbers from a separate timesheet and I would like to build part of the external reference workbook name from a cell instead of hard-coding it. For example: =SUMIF('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22,C6,'[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22) I have a cell with the resource name and I would like to plug in the name from that cell for €œFirstName_LastName€ but I can€„¢t seem to get that to work. Any thoughts? -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Put the INDIRECT inside the SUMIF, not the other way around.
Nancy Taylor wrote: Hi Dave, I haven't used the Indirect function before so I've been playing with it to see how it works. I've been able to get the SUMIF statement built but I am getting that annoying #REF! error. I do have the workbook that I am referencing open and I have used the debug to step into the formula to make sure everything is resolving correctly. Looks OK but I can't get it to work. In case you can spot something easy that I can fix, here's my new formula: =INDIRECT("SUMIF('["&$D$6&".xlsx]Weekly Timesheet'!$L$2:$L$19,"&C6&",'["&$D$6&".xlsx]Weekly Timesheet'!$J$2:$J$19)") I'll keep trying... Thanks for the tip! Nancy "Dave Peterson" wrote: You've got a couple of obstacles to overcome. First... What you'd want to use is =indirect() and build a formula that results in the string that points at the folder, file, sheet, location. But the bad thing is that =indirect() won't work if that sending file is closed. If that's a problem, then Laurent Longre has an addin (morefunc.xll) at: http://xcell05.free.fr/ or http://xcell05.free.fr/morefunc/english/index.htm That includes =indirect.ext() that may help you. Second... =sumif() will return an error if the workbook is closed. You could replace it with =sumproduct() =sumproduct(--('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22=C6), ('[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22)) But you'd still may have to overcome the closed workbook problem. ps. You can't use the entire column in the =sumproduct() formula unless you're using xl2007. Nancy Taylor wrote: I hope this is an easy question to answer... I am attempting to use a SUMIF to pull in numbers from a separate timesheet and I would like to build part of the external reference workbook name from a cell instead of hard-coding it. For example: =SUMIF('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22,C6,'[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22) I have a cell with the resource name and I would like to plug in the name from that cell for €œFirstName_LastName€ but I can€„¢t seem to get that to work. Any thoughts? -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Just to add to Glenn's response:
=sumif(indirect("'["&$d$6&".xlsx]weekly timesheet'!l2:l19"),c6, indirect("'["&$d$6&".xlsx]weekly timesheet'!j2:j19")) (I didn't test it, so watch out for my typos!) Since L2:L19 and J2:J19 are within doublequotes (and are strings, the $'s weren't necessary. If you still have trouble, share what's in D6, too. It should be just the name (without the extension and without the drive and path). Nancy Taylor wrote: Hi Dave, I haven't used the Indirect function before so I've been playing with it to see how it works. I've been able to get the SUMIF statement built but I am getting that annoying #REF! error. I do have the workbook that I am referencing open and I have used the debug to step into the formula to make sure everything is resolving correctly. Looks OK but I can't get it to work. In case you can spot something easy that I can fix, here's my new formula: =INDIRECT("SUMIF('["&$D$6&".xlsx]Weekly Timesheet'!$L$2:$L$19,"&C6&",'["&$D$6&".xlsx]Weekly Timesheet'!$J$2:$J$19)") I'll keep trying... Thanks for the tip! Nancy "Dave Peterson" wrote: You've got a couple of obstacles to overcome. First... What you'd want to use is =indirect() and build a formula that results in the string that points at the folder, file, sheet, location. But the bad thing is that =indirect() won't work if that sending file is closed. If that's a problem, then Laurent Longre has an addin (morefunc.xll) at: http://xcell05.free.fr/ or http://xcell05.free.fr/morefunc/english/index.htm That includes =indirect.ext() that may help you. Second... =sumif() will return an error if the workbook is closed. You could replace it with =sumproduct() =sumproduct(--('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22=C6), ('[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22)) But you'd still may have to overcome the closed workbook problem. ps. You can't use the entire column in the =sumproduct() formula unless you're using xl2007. Nancy Taylor wrote: I hope this is an easy question to answer... I am attempting to use a SUMIF to pull in numbers from a separate timesheet and I would like to build part of the external reference workbook name from a cell instead of hard-coding it. For example: =SUMIF('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22,C6,'[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22) I have a cell with the resource name and I would like to plug in the name from that cell for €œFirstName_LastName€ but I can€„¢t seem to get that to work. Any thoughts? -- Dave Peterson -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Beautiful! Thank you so much for your help! I appreciate it soooo much!
I can call it a day now and enjoy my weekend without this pesky problem keeping me up all night! Hope you have a wonderful weekend! Nancy "Dave Peterson" wrote: Just to add to Glenn's response: =sumif(indirect("'["&$d$6&".xlsx]weekly timesheet'!l2:l19"),c6, indirect("'["&$d$6&".xlsx]weekly timesheet'!j2:j19")) (I didn't test it, so watch out for my typos!) Since L2:L19 and J2:J19 are within doublequotes (and are strings, the $'s weren't necessary. If you still have trouble, share what's in D6, too. It should be just the name (without the extension and without the drive and path). Nancy Taylor wrote: Hi Dave, I haven't used the Indirect function before so I've been playing with it to see how it works. I've been able to get the SUMIF statement built but I am getting that annoying #REF! error. I do have the workbook that I am referencing open and I have used the debug to step into the formula to make sure everything is resolving correctly. Looks OK but I can't get it to work. In case you can spot something easy that I can fix, here's my new formula: =INDIRECT("SUMIF('["&$D$6&".xlsx]Weekly Timesheet'!$L$2:$L$19,"&C6&",'["&$D$6&".xlsx]Weekly Timesheet'!$J$2:$J$19)") I'll keep trying... Thanks for the tip! Nancy "Dave Peterson" wrote: You've got a couple of obstacles to overcome. First... What you'd want to use is =indirect() and build a formula that results in the string that points at the folder, file, sheet, location. But the bad thing is that =indirect() won't work if that sending file is closed. If that's a problem, then Laurent Longre has an addin (morefunc.xll) at: http://xcell05.free.fr/ or http://xcell05.free.fr/morefunc/english/index.htm That includes =indirect.ext() that may help you. Second... =sumif() will return an error if the workbook is closed. You could replace it with =sumproduct() =sumproduct(--('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22=C6), ('[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22)) But you'd still may have to overcome the closed workbook problem. ps. You can't use the entire column in the =sumproduct() formula unless you're using xl2007. Nancy Taylor wrote: I hope this is an easy question to answer... I am attempting to use a SUMIF to pull in numbers from a separate timesheet and I would like to build part of the external reference workbook name from a cell instead of hard-coding it. For example: =SUMIF('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22,C6,'[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22) I have a cell with the resource name and I would like to plug in the name from that cell for €ŀœFirstName_LastName€ but I can€„¢t seem to get that to work. Any thoughts? -- Dave Peterson -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Dave,
Well, I have gone through and replaced my sumifs with sumproducts and downloaded the morefunc so that I can take advantage of the indirect.ext, but my formulas still give me a #REF! if the associated spreadsheets are closed. Is there a trick to getting the indirect.ext to work? Nancy "Dave Peterson" wrote: You've got a couple of obstacles to overcome. First... What you'd want to use is =indirect() and build a formula that results in the string that points at the folder, file, sheet, location. But the bad thing is that =indirect() won't work if that sending file is closed. If that's a problem, then Laurent Longre has an addin (morefunc.xll) at: http://xcell05.free.fr/ or http://xcell05.free.fr/morefunc/english/index.htm That includes =indirect.ext() that may help you. Second... =sumif() will return an error if the workbook is closed. You could replace it with =sumproduct() =sumproduct(--('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22=C6), ('[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22)) But you'd still may have to overcome the closed workbook problem. ps. You can't use the entire column in the =sumproduct() formula unless you're using xl2007. Nancy Taylor wrote: I hope this is an easy question to answer... I am attempting to use a SUMIF to pull in numbers from a separate timesheet and I would like to build part of the external reference workbook name from a cell instead of hard-coding it. For example: =SUMIF('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22,C6,'[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22) I have a cell with the resource name and I would like to plug in the name from that cell for €œFirstName_LastName€ but I can€„¢t seem to get that to work. Any thoughts? -- Dave Peterson |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
For me, it's more trial and error.
If you can't get it working, share the formula you used. (I'd get the simple =indirect.ext() working first.) And share the values in each of the cells that the formula refers to. I'm sure you'll get some suggestions. Nancy Taylor wrote: Hi Dave, Well, I have gone through and replaced my sumifs with sumproducts and downloaded the morefunc so that I can take advantage of the indirect.ext, but my formulas still give me a #REF! if the associated spreadsheets are closed. Is there a trick to getting the indirect.ext to work? Nancy "Dave Peterson" wrote: You've got a couple of obstacles to overcome. First... What you'd want to use is =indirect() and build a formula that results in the string that points at the folder, file, sheet, location. But the bad thing is that =indirect() won't work if that sending file is closed. If that's a problem, then Laurent Longre has an addin (morefunc.xll) at: http://xcell05.free.fr/ or http://xcell05.free.fr/morefunc/english/index.htm That includes =indirect.ext() that may help you. Second... =sumif() will return an error if the workbook is closed. You could replace it with =sumproduct() =sumproduct(--('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22=C6), ('[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22)) But you'd still may have to overcome the closed workbook problem. ps. You can't use the entire column in the =sumproduct() formula unless you're using xl2007. Nancy Taylor wrote: I hope this is an easy question to answer... I am attempting to use a SUMIF to pull in numbers from a separate timesheet and I would like to build part of the external reference workbook name from a cell instead of hard-coding it. For example: =SUMIF('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22,C6,'[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22) I have a cell with the resource name and I would like to plug in the name from that cell for €œFirstName_LastName€ but I can€„¢t seem to get that to work. Any thoughts? -- Dave Peterson -- Dave Peterson |
#10
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Not sure if my last post worked so trying again...
Here's my formula: =SUMPRODUCT(--(INDIRECT.EXT("'["&$B$2&"_"&D6&".xlsm]Weekly Timesheet'!$N:$N")=C6),(INDIRECT.EXT("'["&$B$2&"_"&D6&".xlsm]weekly timesheet'!$L:$L"))) B2 = 09122009 D6 = Nancy Taylor C6 = Project and phase name I need to total column N = timesheet project and phase names column L = timesheet hours It seems to work if I have the detail spreadsheets open before I open the summary spreadsheet but if the detail spreadsheets are closed, the #REF! comes up. If I then open the detail sheets, the #REF! resolves itself. Make any sense to anyone? "Dave Peterson" wrote: For me, it's more trial and error. If you can't get it working, share the formula you used. (I'd get the simple =indirect.ext() working first.) And share the values in each of the cells that the formula refers to. I'm sure you'll get some suggestions. Nancy Taylor wrote: Hi Dave, Well, I have gone through and replaced my sumifs with sumproducts and downloaded the morefunc so that I can take advantage of the indirect.ext, but my formulas still give me a #REF! if the associated spreadsheets are closed. Is there a trick to getting the indirect.ext to work? Nancy "Dave Peterson" wrote: You've got a couple of obstacles to overcome. First... What you'd want to use is =indirect() and build a formula that results in the string that points at the folder, file, sheet, location. But the bad thing is that =indirect() won't work if that sending file is closed. If that's a problem, then Laurent Longre has an addin (morefunc.xll) at: http://xcell05.free.fr/ or http://xcell05.free.fr/morefunc/english/index.htm That includes =indirect.ext() that may help you. Second... =sumif() will return an error if the workbook is closed. You could replace it with =sumproduct() =sumproduct(--('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22=C6), ('[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22)) But you'd still may have to overcome the closed workbook problem. ps. You can't use the entire column in the =sumproduct() formula unless you're using xl2007. Nancy Taylor wrote: I hope this is an easy question to answer... I am attempting to use a SUMIF to pull in numbers from a separate timesheet and I would like to build part of the external reference workbook name from a cell instead of hard-coding it. For example: =SUMIF('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22,C6,'[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22) I have a cell with the resource name and I would like to plug in the name from that cell for €ŀœFirstName_LastName€ but I can€„¢t seem to get that to work. Any thoughts? -- Dave Peterson -- Dave Peterson |
#11
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
As Dave and I both said, INDIRECT does NOT work with closed workbooks. !!!
-- Don Guillett Microsoft MVP Excel SalesAid Software "Nancy Taylor" wrote in message ... Not sure if my last post worked so trying again... Here's my formula: =SUMPRODUCT(--(INDIRECT.EXT("'["&$B$2&"_"&D6&".xlsm]Weekly Timesheet'!$N:$N")=C6),(INDIRECT.EXT("'["&$B$2&"_"&D6&".xlsm]weekly timesheet'!$L:$L"))) B2 = 09122009 D6 = Nancy Taylor C6 = Project and phase name I need to total column N = timesheet project and phase names column L = timesheet hours It seems to work if I have the detail spreadsheets open before I open the summary spreadsheet but if the detail spreadsheets are closed, the #REF! comes up. If I then open the detail sheets, the #REF! resolves itself. Make any sense to anyone? "Dave Peterson" wrote: For me, it's more trial and error. If you can't get it working, share the formula you used. (I'd get the simple =indirect.ext() working first.) And share the values in each of the cells that the formula refers to. I'm sure you'll get some suggestions. Nancy Taylor wrote: Hi Dave, Well, I have gone through and replaced my sumifs with sumproducts and downloaded the morefunc so that I can take advantage of the indirect.ext, but my formulas still give me a #REF! if the associated spreadsheets are closed. Is there a trick to getting the indirect.ext to work? Nancy "Dave Peterson" wrote: You've got a couple of obstacles to overcome. First... What you'd want to use is =indirect() and build a formula that results in the string that points at the folder, file, sheet, location. But the bad thing is that =indirect() won't work if that sending file is closed. If that's a problem, then Laurent Longre has an addin (morefunc.xll) at: http://xcell05.free.fr/ or http://xcell05.free.fr/morefunc/english/index.htm That includes =indirect.ext() that may help you. Second... =sumif() will return an error if the workbook is closed. You could replace it with =sumproduct() =sumproduct(--('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22=C6), ('[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22)) But you'd still may have to overcome the closed workbook problem. ps. You can't use the entire column in the =sumproduct() formula unless you're using xl2007. Nancy Taylor wrote: I hope this is an easy question to answer... I am attempting to use a SUMIF to pull in numbers from a separate timesheet and I would like to build part of the external reference workbook name from a cell instead of hard-coding it. For example: =SUMIF('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22,C6,'[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22) I have a cell with the resource name and I would like to plug in the name from that cell for €ŀœFirstName_LastName€ but I can€„¢t seem to get that to work. Any thoughts? -- Dave Peterson -- Dave Peterson |
#12
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You need to include the drive and folder, too. Otherwise, how would
=indirect.ext() know which drive/folder to look into. ps. If that 09122009 is a date that's formatted as mmddyyyy (or ddmmyyyy), you'll want to use: ...&text($b$2,"mmddyyyy")&... or if it's a plain old number that's formatted to show leading 0's: ...&text($b$2,"00000000")&... ======== pps. Remember that if you have to share this workbook with people not using xl2007, then you won't want to use the entire column. (that only works in xl2007.) Nancy Taylor wrote: Not sure if my last post worked so trying again... Here's my formula: =SUMPRODUCT(--(INDIRECT.EXT("'["&$B$2&"_"&D6&".xlsm]Weekly Timesheet'!$N:$N")=C6),(INDIRECT.EXT("'["&$B$2&"_"&D6&".xlsm]weekly timesheet'!$L:$L"))) B2 = 09122009 D6 = Nancy Taylor C6 = Project and phase name I need to total column N = timesheet project and phase names column L = timesheet hours It seems to work if I have the detail spreadsheets open before I open the summary spreadsheet but if the detail spreadsheets are closed, the #REF! comes up. If I then open the detail sheets, the #REF! resolves itself. Make any sense to anyone? "Dave Peterson" wrote: For me, it's more trial and error. If you can't get it working, share the formula you used. (I'd get the simple =indirect.ext() working first.) And share the values in each of the cells that the formula refers to. I'm sure you'll get some suggestions. Nancy Taylor wrote: Hi Dave, Well, I have gone through and replaced my sumifs with sumproducts and downloaded the morefunc so that I can take advantage of the indirect.ext, but my formulas still give me a #REF! if the associated spreadsheets are closed. Is there a trick to getting the indirect.ext to work? Nancy "Dave Peterson" wrote: You've got a couple of obstacles to overcome. First... What you'd want to use is =indirect() and build a formula that results in the string that points at the folder, file, sheet, location. But the bad thing is that =indirect() won't work if that sending file is closed. If that's a problem, then Laurent Longre has an addin (morefunc.xll) at: http://xcell05.free.fr/ or http://xcell05.free.fr/morefunc/english/index.htm That includes =indirect.ext() that may help you. Second... =sumif() will return an error if the workbook is closed. You could replace it with =sumproduct() =sumproduct(--('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22=C6), ('[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22)) But you'd still may have to overcome the closed workbook problem. ps. You can't use the entire column in the =sumproduct() formula unless you're using xl2007. Nancy Taylor wrote: I hope this is an easy question to answer... I am attempting to use a SUMIF to pull in numbers from a separate timesheet and I would like to build part of the external reference workbook name from a cell instead of hard-coding it. For example: =SUMIF('[FirstName_LastName.xlsx]Sheet'!$L$5:$L$22,C6,'[FirstName_LastName.xlsx]Sheet'!$K$5:$K$22) I have a cell with the resource name and I would like to plug in the name from that cell for €ŀœFirstName_LastName€ but I can€„¢t seem to get that to work. Any thoughts? -- Dave Peterson -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SUMIF statement with AND statement | Excel Discussion (Misc queries) | |||
Sumif statement | Excel Discussion (Misc queries) | |||
Dynamic sumif function | Excel Worksheet Functions | |||
Help please, IF statement/SUMIF statement | Excel Worksheet Functions | |||
sumif statement | Excel Worksheet Functions |