Copy paste some range between two workbook if they have the same sheet name

Scenario: There have two excel files, one for 2pm and one for 3pm meeting. The files are not exact same, but currently we need to copy some of the data from 2pm file to 3pm one everyday. I want to automate this using StudioX or Excel VBA.

Requirements: Only copy the value between two worksheet on two different workbook (2pm and 3pm) if they have the same sheet name. For example, copy paste value from sheet “WK1” workbook “2pm” to sheet “WK1” workbook “3pm”.

Challenges: I encounter difficulties using if condition builder to show if they have the same sheet name.

Example file:
2pmTrial.xlsx (11.3 KB)
3pmTrial.xlsx (11.2 KB)

Thank you very much.

1 Like

Hey @Low_Hua_Kuan

You want the append the data between sheets or just adding ?

Thanks
#nK

Hi Nithin,

I want to add the data from 2pm to 3pm and it would be better to make them self-update regularly.

1 Like

Hey @Low_Hua_Kuan

Yes you are right, My query is about the entire business logic.

What happens if the sheet is already present in 3pm sheet or a sheet with same name is already present ?

1 Like

Hi Nithin,

If the sheet ady present, then just continuing update it. On the other hand, if the sheet didn’t exist, just create a new sheet on 3pm workbook using template given and add the value from 2pm workbook. So that my colleagues only have to verify the data and add few more value without copy paste the repeated data between two workbook everyday.

1 Like

For sheet already exist, When you say update is it to append the data or to overwrite ?

Overwrite as it is the newest, updated data.

1 Like