It requires a lot of variables

Enter a date on the Internet web and save the resulting data in A and B. This activity must be done up to +10 days. Using for each, I want to sequentially enter the dates and put the data that appears on the corresponding date into variables called A0 and B0, and sequentially put them into A1, B1 +1 / +2 days A2, B2. In my common sense, I need to create 30 variables. Is there a simple way to solve this?

We will later enter the variables saved in this way into Excel.

I want to put the saved values ​​into sheet2.
TEST.xlsx (10.6 KB)

Best option is to read the excel details first and get this into a data table. Loop through the data table and search one by one. While entering the data and criteria - Get the result from web and write it back to excel.

Or if you want to follow exactly your method. Other options are

  1. Try including the steps of excel also within the loop so that you need to use only 2 variables and keep updating the same after writing it back to excel

  2. Create a datatable with 2 columns. While looping - Add rows to this datatable with proper reference. Use the same while writing to excel. If the excel reference could be added to datatable - it will make your life easy

Let me know if you need more details on any of the above solution

There are dates, same day, +1, +2~ +10 in sheet2
and I need to continue pasting them down the next day.
I don’t even know how to continue pasting them sideways using two variables…
Please help me. It would be great if you had a sample.

I need to use write cell dynamically. Is it possible to do so within for each?

Okay I will build a sample and share soon

Thank you so much for freeing me from my pain.

@LOGI_RPA

Kindly check the below code. I have created based on my understanding. This might not be the full solution but this will definitely help you to build your logic. Kindly check and let me know

ForumTest.zip (570.6 KB)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.