I'm currently using this code to populate Cell B of the first empty row of Sheet1.
I would like to merge Cells B-F before or after populating Cell B so data fits in merged cells.
any suggestions?
Code:
Public Sub PO_Notes()
Static oldval
If Range("J1").Value <> oldval Then
oldval = Range("J1").Value
a = Worksheets("Temp").Cells(Rows.Count, 1).End(xlUp).Row
For i = 1 To a
If Worksheets("Temp").Cells(i, 2) = Worksheets("Sheet1").Cells(1, 10) Then
Sheets("Temp").Select
Range("F1").Select
Selection.Copy
Worksheets("Sheet1").Activate
b = Worksheets("Sheet1").Cells(Rows.Count, 2).End(xlUp).Row
Worksheets("Sheet1").Cells(b + 1, 2).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
With Selection.Font
.Name = "Calibri"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontMinor
End With
Worksheets("Temp").Activate
End If
Next
Application.CutCopyMode = False
Worksheets("Sheet1").Activate
ThisWorkbook.Worksheets("Sheet1").Cells(2, 1).Select
End If
End Sub
any suggestions?