Answer the question
In order to leave comments, you need to log in
How to copy only cell values?
Sub m()
For i = 1 To Sheets.Count
If Sheets(i).Name <> "Общий" Then
myR_Total = Sheets("Общий").Range("A" & Sheets("Общий").Rows.Count).End(xlUp).Row
myR_i = Sheets(i).Range("A" & Sheets(i).Rows.Count).End(xlUp).Row
If i = 1 Then
Sheets(i).Rows("1:" & myR_i).Copy Sheets("Общий").Range("A" & myR_Total)
Else
Sheets(i).Rows("2:" & myR_i).Copy Sheets("Общий").Range("A" & myR_Total)
End If
End If
Next
End Sub
Answer the question
In order to leave comments, you need to log in
Answered here
Sub m()
Set Sh = Worksheets("Общий")
For i = 1 To Sheets.Count
myR_Total = Sh.Range("A" & Sh.Rows.Count).End(xlUp).Row
With Sheets(i)
If .Name <> "Общий" Then
myR_i = .Range("A" & .Rows.Count).End(xlUp).Row
j = IIf(i = 1, 1, 2)
.Rows(j & ":" & myR_i).Copy
Sh.Range("A" & myR_Total).PasteSpecial Paste:=xlPasteValues
End If
End With
Next
End Sub
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question