There are 71 worksheets in the workbook I am working on. I want to extract the text from a merged range which have the same location in each sheet.
Sub extract_text()
Application.ScreenUpdating = False
'copy current situation
Sheets(ActiveSheet.Range("A1").Value).Select
Range("F32:G44").Select
Selection.Copy
Sheets("combined").Select
Selection.PasteSpecial Paste:=xlPasteFormulasAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Range("B1").Select
'copy reasons
Sheets(ActiveSheet.Range("A1").Value).Select
Range("F45:G55").Select
Selection.Copy
Sheets("combined").Select
Selection.PasteSpecial Paste:=xlPasteFormulasAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Range("B2").Select
'copy solutions
Sheets(ActiveSheet.Range("A1").Value).Select
Range("F56:G64").Select
Selection.Copy
Sheets("combined").Select
Range("B3").Select
Selection.PasteSpecial Paste:=xlPasteFormulasAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
End Sub
First I tried to do it with simple blocks of code in which based on the sheet name in column A, it will copy the range in that specific sheet and paste it in another sheet called "combined" but it doesn't work well and I don't know how to build a loop for the other worksheets. I have done some research but haven't found any solutions.







Combine Sheets