Issue with a macro

richard1234567891011

Board Regular
Joined
Feb 21, 2018
Messages
91
Hi guys,

I am not an expert with macros, but,

I have this macro:

Sub CombineData()

Rows("4:99999").Select
Selection.Delete Shift:=xlUp
ActiveWindow.SmallScroll Down:=-15



Dim Sht As Worksheet
For Each Sht In ActiveWorkbook.Worksheets
If Sht.Name <> "Master" Then
Sht.Select
Range("A:A").Insert
Range("A5").Formula = "=Mid(Cell(""filename"",B1),Find(""]"",Cell(""filename""))+1,255)"
Range("A5").Copy
Range("A5").PasteSpecial Paste:=xlPasteValues
Range("A15:Bz500").Copy
Sheets("Proposte").Select
Range("A65536").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
Sht.Select
Range("A:A").Delete
Else
End If
Next Sht


End Sub


I don't understand why the macro is pasting in B4 in "Proposte" instead of in A4 in "Proposte".
How can I change this? I need to paste in A4 and not in B4.

Thank you guys.
 

Some videos you may like

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
40,524
Office Version
365
Platform
Windows
Try
Rich (BB code):
Range("B15:Bz500").Copy
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
40,524
Office Version
365
Platform
Windows
Do you just want to copy values?
 

Watch MrExcel Video

Forum statistics

Threads
1,098,858
Messages
5,465,104
Members
406,412
Latest member
superjoejoe

This Week's Hot Topics

Top