Try this code 

Sub Macro8()

    Sheets("Pivot 101 value (NA)").Range("R7").FormulaR1C1 = 
"=SUMIFS('PrevNON NA'!C[-1],'PrevNON NA'!C[-13],[@[Po Number]],'PrevNON 
NA'!C[-12],[@[Po Line]])"
    lr = Sheets("Pivot 101 value (NON NA)").Cells(Rows.Count, 
18).End(xlUp).Row
    Range("R7:R" & lr).FillDown
    
    Sheets("Pivot 101 value (NA)").Select
     Range("R7").Select
    ActiveCell.FormulaR1C1 = "=SUMIFS('PrevNA'!C[-1],'PrevNA'!C[-13],[@[Po 
Number]],'PrevNA'!C[-12],[@[Po Line]])"
    lr = Sheets("Pivot 101 value (NA)").Cells(Rows.Count, 18).End(xlUp).Row
    Range("R7:R" & lr).FillDown
    
End Sub



' Regards :- Mandeep baluja
'https://www.facebook.com/groups/825221420889809/
'https://www.linkedin.com/in/mandeep-baluja-b777bb88
Add a share  if it helps :)
'******************************

















On Wednesday, May 11, 2016 at 11:28:19 AM UTC+5:30, raj.he...@gmail.com 
wrote:
>
> Hello Everyone,
>
> Just to give quick introduction, Myself Raj  I am  financial Analyst into 
> reporting domain but I try experimenting few codes in excel vba, I have 
> come across this group and found to be really helpful.
>
> Thanks  to Ayush and also one and all,for initiating such helpful platform 
> to each one of us which provides opportunity to learn and can enhance  
> potentials.
>
> I have tried bit coding part I was successful in running but it seems that 
> sumifs formula is taking long time to populate the results .
>
> Sheets("Pivot 101 value (NON NA)").Select
>        Range("R7").Select
>     ActiveCell.FormulaR1C1 = _
>         "=SUMIFS('PrevNON NA'!C[-1],'PrevNON NA'!C[-13],[@[Po 
> Number]],'PrevNON NA'!C[-12],[@[Po Line]])"
>       Selection.AutoFill Destination:=Range("r7:r" & 
> ActiveSheet.UsedRange.Rows.Count)
>
>
> can some one please help me to fix the slow lag issue
>
> in sheets Pivot 101 value (NA) & Pivot 101 value (NON NA)
>
> I am trying to populate R column using sumifs formula the  steps which I 
> followed to get this result is
>
> 1) In sheet "Pivot 101 value (NON NA)")   column r com I am trying to pull 
> values from sheet PrevNON NA from Column Q using PO number  and PO line 
> items combinations in sumifs
> 2) similarly In Sheet Pivot 101 value (NON NA) column r com I am trying to 
> pull values from sheet PrevNA from Column Q using PO number  and PO line 
> items combinations in sumifs
>
>
> Rest of the macro is executing well but only this  sumifs is causing 10-20 
> min time to populate this.
>
> please find the attached macro sheet and kindly help me in fixing this.
>
> Thanks one and all have  a great day.
>
>
>
>
>
> Tha
> Raj
>
>
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

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) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at https://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to