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.
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
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
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?
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