I want the bot to copy the contents in ColF and ColG to a new worksheet and append a new column to reflect the section. This is how I would like the new table in the worksheet to look like:
First you need to get the cell addresses of start and stop of tables
for that what I see is ColA is the first column anme always so use find/Replace and find the cells which contain colA these will give you the start range to pick the data
then repeat the same for end. In end I see Cells: always present sos use it . it will give you cells. extract the number from it and remove 1 to get the last rows.
Now use these as range and read the excel and read the datatable and append the data as you need…While appending add a new column to give your section name
@Anil_G : I’m referring to your earlier reply →
then repeat the same for end. In end I see Cells: always present sos use it . it will give you cells. extract the number from it and remove 1 to get the last rows.
sorry, i get the following error. how do i set my variable?
Thanks. For the find/replace activity, it returns the first occurrence of the value found. How do I get it to find the next occurrence of the value in each section?
So once you have the first occurrence you have the cell value where it is found…so now give the range starting from the next cell… so that it now searches from the cell after that
Can you please mark solution if the issue is resolved that will help others with similar question
I’m referring to your above reply. I tried add data column but it’s giving me error because every time it loops, it creates a new column which the column name already exists.