Forum

Problem setting two...
 
Notifications
Clear all

Problem setting two different ranges on visible rows, with different filters.

3 Posts
2 Users
0 Reactions
67 Views
(@s-samira-21)
Posts: 2
New Member
Topic starter
 

Hi,

I m trying to create a vba file in excel to manage sales
I have a table to save Products and one for Invoice

To calculate total price for all sales in my report userform, I Use worksheetfunction.sumproduct.... and it works well.

Then I want to get the Total value in special period of time. So I filter my Invoice sheet, and set a range on visible cells, and use  worksheetfunction.sumproduct.... in my Range and it works well again...

But Now I want to add new condition, for product cod. again, I filter my Invoice sheet, and set another range on visible cells, and use  worksheetfunction.sumproduct.... this time the second range, just get one record. But the filtered sheet has more records visible.

hope I could explain the problem, correctly. 
for more information, Please see the attachment.

(Dates are in number format because excel date functions doesn't work for Persian dates, and I use sum modules to manage dates)

Thank you so so Much

 
Posted : 09/02/2023 3:28 am
Philip Treacy
(@philipt)
Posts: 1632
Member Admin
 

Hi Samira,

No file attached.  You have to click Start Upload after selecting the file.

Regards

Phil

 
Posted : 09/02/2023 3:59 am
(@s-samira-21)
Posts: 2
New Member
Topic starter
 

Sorry

Download Samira-Invoice.xlsm

 
Posted : 09/02/2023 4:12 am
Share: