Forum

Vlookup in happenin...
 
Notifications
Clear all

Vlookup in happening of loop data in VBA

9 Posts
2 Users
0 Reactions
89 Views
(@arunachaljois21)
Posts: 12
Active Member
Topic starter
 

Hi there,

In my VBA code there is a loop in column Y and there is formula in Column Z
Then i want to filter data "Success" in column Z
But i select only "Success" but not whatever the loop data in column Y
For example if i filtered manually "Success" there total number of rows filtered is 675
If i use macro then only 478 rows are visible

Could anyone please help me on this ?

 
Posted : 17/08/2020 2:54 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Arunachal,

Please attach your workbook.

Regards

Phil

 
Posted : 17/08/2020 8:41 am
(@arunachaljois21)
Posts: 12
Active Member
Topic starter
 

Hi Philip

Here is the attached file for your reference.
Please let me know if you need further information

 
Posted : 17/08/2020 9:16 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Arunachal,

at the start of the Validation() sub you're setting calculation to manual mode Application.Calculation = xlCalculationManual 

When you run Validation and filter the data the VLOOKUP formulae in some cells have not updated and are showing #N/A errors.

At the end of the Validation() sub you set calculation back to automatic and the #N/A cells with VLOOKUP update to the value "Success" hence the difference in the counts.

Not sure why you have calculation set to manual at the start of the Validation() sub?

Regards

Phil

 
Posted : 18/08/2020 6:42 am
(@arunachaljois21)
Posts: 12
Active Member
Topic starter
 

Hi Philip
Could you make changes in that file ?

 
Posted : 18/08/2020 9:28 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Arunachal,

at the start of the Validation() sub just remove the line  Application.Calculation = xlCalculationManual 

Regards

Phil

 
Posted : 18/08/2020 6:13 pm
(@arunachaljois21)
Posts: 12
Active Member
Topic starter
 

Hi Philip,

I changed manual to Application.Calculation = xlCalculationAutomatic
now it is working fine

But if it cause any other issue doing like this ?

 
Posted : 19/08/2020 1:31 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Not that I can think of.

 
Posted : 25/08/2020 7:25 pm
(@arunachaljois21)
Posts: 12
Active Member
Topic starter
 

Thanks

 
Posted : 29/08/2020 3:00 am
Share: