Thank you Noorain. Yes, Evaluate() does put a value in the cell instead of a formuala. That is great. Do you have any idea how to make the equation include "<=" in the last clause?
On Friday, June 1, 2012 8:58:42 PM UTC-4, NOORAIN ANSARI wrote: > Dear Mark, > > You can try.. > . > .Range("q" & i).Formula = *Evaluate(*"=SUMIFS(O$2:O$26196,A$2:A$26196," & > "a" & i & ",N$2:N$26196," & "n" & i & ")"*)* > > -- > Thanks & regards, > Noorain Ansari > www.noorainansari.com > www.excelmacroworld.blogspot.com > > On Sat, Jun 2, 2012 at 12:13 AM, Mark Kerin <mark.ke...@gmail.com> wrote: > >> >> This formula works in a cell: >> =SUMIFS(O$2:O$26196,A$2:A$26196,A2,N$2:N$26196,"<="&N2) >> >> 1) I want to have vba make this calculation - because calculating it in >> each cell bogs down the xls. >> I got the following vba to work but I cant figure out how to add "<=" to >> the last clause (col N has dates): >> >> .Range("q" & i).Formula = "=SUMIFS(O$2:O$26196,A$2:A$26196," & "a" & i & >> ",N$2:N$26196," & "n" & i & ")" >> >> 2) How do I get VBA to make this calculation and put the result in each >> cell instead of putting a formula in each cell? >> >> ...I am open to other suggestions... e.g. would an array use less >> resources? >> >> Thanks. >> >> -- >> FORUM RULES (986+ members already BANNED for violation) >> >> 1) Use concise, accurate thread titles. Poor thread titles, like Please >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice >> will not get quick attention or may not be answered. >> >> 2) Don't post a question in the thread of another member. >> >> 3) Don't post questions regarding breaking or bypassing any security >> measure. >> >> 4) Acknowledge the responses you receive, good or bad. >> >> 5) Cross-promotion of, or links to, forums competitive to this forum in >> signatures are prohibited. >> >> NOTE : Don't ever post personal or confidential data in a workbook. Forum >> owners and members are not responsible for any loss. >> >> >> ------------------------------------------------------------------------------------------------------ >> To post to this group, send email to excel-macros@googlegroups.com >> >> To unsubscribe, send a blank email to >> excel-macros+unsubscr...@googlegroups.com > > > > > > > > On Friday, June 1, 2012 8:58:42 PM UTC-4, NOORAIN ANSARI wrote: > > Dear Mark, > > You can try.. > . > .Range("q" & i).Formula = *Evaluate(*"=SUMIFS(O$2:O$26196,A$2:A$26196," & > "a" & i & ",N$2:N$26196," & "n" & i & ")"*)* > > -- > Thanks & regards, > Noorain Ansari > www.noorainansari.com > www.excelmacroworld.blogspot.com > > On Sat, Jun 2, 2012 at 12:13 AM, Mark Kerin <mark.ke...@gmail.com> wrote: > >> >> This formula works in a cell: >> =SUMIFS(O$2:O$26196,A$2:A$26196,A2,N$2:N$26196,"<="&N2) >> >> 1) I want to have vba make this calculation - because calculating it in >> each cell bogs down the xls. >> I got the following vba to work but I cant figure out how to add "<=" to >> the last clause (col N has dates): >> >> .Range("q" & i).Formula = "=SUMIFS(O$2:O$26196,A$2:A$26196," & "a" & i & >> ",N$2:N$26196," & "n" & i & ")" >> >> 2) How do I get VBA to make this calculation and put the result in each >> cell instead of putting a formula in each cell? >> >> ...I am open to other suggestions... e.g. would an array use less >> resources? >> >> Thanks. >> >> -- >> FORUM RULES (986+ members already BANNED for violation) >> >> 1) Use concise, accurate thread titles. Poor thread titles, like Please >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice >> will not get quick attention or may not be answered. >> >> 2) Don't post a question in the thread of another member. >> >> 3) Don't post questions regarding breaking or bypassing any security >> measure. >> >> 4) Acknowledge the responses you receive, good or bad. >> >> 5) Cross-promotion of, or links to, forums competitive to this forum in >> signatures are prohibited. >> >> NOTE : Don't ever post personal or confidential data in a workbook. Forum >> owners and members are not responsible for any loss. >> >> >> ------------------------------------------------------------------------------------------------------ >> To post to this group, send email to excel-macros@googlegroups.com >> >> To unsubscribe, send a blank email to >> excel-macros+unsubscr...@googlegroups.com > > > > > > > > On Friday, June 1, 2012 8:58:42 PM UTC-4, NOORAIN ANSARI wrote: > > Dear Mark, > > You can try.. > . > .Range("q" & i).Formula = *Evaluate(*"=SUMIFS(O$2:O$26196,A$2:A$26196," & > "a" & i & ",N$2:N$26196," & "n" & i & ")"*)* > > -- > Thanks & regards, > Noorain Ansari > www.noorainansari.com > www.excelmacroworld.blogspot.com > > On Sat, Jun 2, 2012 at 12:13 AM, Mark Kerin <mark.ke...@gmail.com> wrote: > >> >> This formula works in a cell: >> =SUMIFS(O$2:O$26196,A$2:A$26196,A2,N$2:N$26196,"<="&N2) >> >> 1) I want to have vba make this calculation - because calculating it in >> each cell bogs down the xls. >> I got the following vba to work but I cant figure out how to add "<=" to >> the last clause (col N has dates): >> >> .Range("q" & i).Formula = "=SUMIFS(O$2:O$26196,A$2:A$26196," & "a" & i & >> ",N$2:N$26196," & "n" & i & ")" >> >> 2) How do I get VBA to make this calculation and put the result in each >> cell instead of putting a formula in each cell? >> >> ...I am open to other suggestions... e.g. would an array use less >> resources? >> >> Thanks. >> >> -- >> FORUM RULES (986+ members already BANNED for violation) >> >> 1) Use concise, accurate thread titles. Poor thread titles, like Please >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice >> will not get quick attention or may not be answered. >> >> 2) Don't post a question in the thread of another member. >> >> 3) Don't post questions regarding breaking or bypassing any security >> measure. >> >> 4) Acknowledge the responses you receive, good or bad. >> >> 5) Cross-promotion of, or links to, forums competitive to this forum in >> signatures are prohibited. >> >> NOTE : Don't ever post personal or confidential data in a workbook. Forum >> owners and members are not responsible for any loss. >> >> >> ------------------------------------------------------------------------------------------------------ >> To post to this group, send email to excel-macros@googlegroups.com >> >> To unsubscribe, send a blank email to >> excel-macros+unsubscr...@googlegroups.com > > > > > > > > -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com