I have a workbook(Individual_Doctors) that has several sheets(each named by doctor's last name) and a seperate workbook(Data) with one sheet containing the doctor's full name and total charges. The sheet with charge information would have the doctors name in column A and the charges in column B, down the sheet and separated by a blank row:
Column A Column B
1 Jones, John 50000
2
3 Smith, Fred 10000
4
5 Miller, Tom 12000
I want to create a loop that opens the Individual_Doctors workbook and loops through the sheets one by one, for example selects the sheet "Jones", then opens the Data workbook and looks through the column A for the selected sheet's name Like ("Jones". Then grabs the data from column B(50000) and paste it back into the selected sheet(Jones) back in the Individual_Doctors workbook.
It seems like it should be possible but I'm having trouble getting the loop to work. Any suggestions would be appreciated.
Column A Column B
1 Jones, John 50000
2
3 Smith, Fred 10000
4
5 Miller, Tom 12000
I want to create a loop that opens the Individual_Doctors workbook and loops through the sheets one by one, for example selects the sheet "Jones", then opens the Data workbook and looks through the column A for the selected sheet's name Like ("Jones". Then grabs the data from column B(50000) and paste it back into the selected sheet(Jones) back in the Individual_Doctors workbook.
It seems like it should be possible but I'm having trouble getting the loop to work. Any suggestions would be appreciated.