Hi have the attached solution which works. but it is too slow.
i was wondering if there is a way to modify the code and use alternative options in VBA for example Scripting Dictionary to make this solution work faster.
Book.xlsb
Hi have the attached solution which works. but it is too slow.
i was wondering if there is a way to modify the code and use alternative options in VBA for example Scripting Dictionary to make this solution work faster.
Book.xlsb
Are you familiar with pivottables ?
thanks very much for reply and willingness to help.
i replied to the other thread. pivot table is not an option.
thanks.
In that case you better shouldn't use Excel at all.
Microsoft doesn't have such compulsions about their Excel users.
Anyway, is this a sample workbook, and the original one is much larger?
A dream is not something you see when you are asleep, but something you strive for when you are awake.
It's usually a bad idea to say that something can't be done.
The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve
Join us at Facebook
this is the sample workbook. original is more or less the same. if i can make this work, then i can update the original one as well.
thanks alot Administrator
Here's a formula based code
This won't work in Excel 2003 or lesser versions. Post back if you need this to work in any of those versionsCode:Sub MacroAll() Dim lngR As Long lngR = Worksheets("Data").Cells(Rows.Count, 1).End(xlUp).Row With Worksheets("Main") With .Range(.Range("B3"), .Range("K14")) .FormulaR1C1 = _ "=SUMIFS(Data!R2C4:R" & lngR & "C4,Data!R2C1:R" & lngR & "C1,VALUE(Main!R2C),Data!R2C2:R" & lngR & "C2,VALUE(Main!RC1))" .Value = .Value End With End With End Sub
A dream is not something you see when you are asleep, but something you strive for when you are awake.
It's usually a bad idea to say that something can't be done.
The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve
Join us at Facebook
dear Administrator
thanks very much. the code is much faster and it works as i have excel 2016. it has one issue. the condition of product is missing. it ignores that. the condition on the product is that anything other than product which starts from 5, 6 , 7 should be excluded. meaning that only product ID starting with 5 6 7 should count.
is this possible with this R1C1 SUMIF?
thanks
I have tried using =5* =6* =7* but it did not work.
Last edited by flora; 11-28-2017 at 05:03 AM.
Bookmarks