Two Conditions With Calculate Percentage in a Dynamic Range

Hakan00

New Member
Joined
Mar 28, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi everybody,

I have a file that automatically pulls the data (Warehouse-1 and Warehouse-2) on the P1 page and prints it by continuously adding it to the right on the P2 page via API every 5 minutes.
I need to write another macro, but I couldn't get out of it. I will be grateful if you could help me. Thanks in advance.

In the attached file, green header is Warehouse1 data, blue header is Warehouse2 data. By the way there are 350 products. You can see P1(Page1) and P2(Page2) attached files.

It should be like this:
The % change of Warehouse 2 compared to the previous column will be calculated, if this % increase is more than 15% and if the % change of Warehouse1 is less than 10%, it will create a table on the P3 page and print it. It will not print data that does not meet this requirement.
For example, column G printed column E if the % change is more than 15% and column F is on page P3 if the % change compared to column D is less than 10%. When new values come to the H and I columns after 5 minutes, this time the comparison will be made according to the F and G columns.
 

Attachments

  • P1.PNG
    P1.PNG
    24.8 KB · Views: 7
  • P2.PNG
    P2.PNG
    36.7 KB · Views: 8

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,214,533
Messages
6,120,076
Members
448,943
Latest member
sharmarick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top