Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.
Sub Sample()
Dim i As Long, LastRow As Long, CLastRow As Long
Dim ws As Worksheet
Dim temp As Long
Set ws = Sheets("Flavored non FOB")
LastRow = ws.Range("F" & Rows.Count).End(xlUp).Row + 1
For i = 6 To LastRow
If ws.Range("F" & i).Font.Bold = True And _
Len(Trim(ws.Range("F" & i).Value)) <> 0 Then
ws.Range("F" & i).Offset(, -3).Value = ws.Range("F" & i).Value
If temp <> 0 Then
ws.Range("C" & temp).AutoFill Destination:=Range("C" & temp & ":C" & i - 1)
End If
temp = i
End If
Next i
CLastRow = ws.Range("C" & Rows.Count).End(xlUp).Row
ws.Range("C" & CLastRow).AutoFill Destination:=ws.Range("C" & CLastRow & ":C" & LastRow)
End Sub
Updated-EE-Copy-Test.xlsm
Sub Sample()
Dim i As Long, LastRow As Long, CLastRow As Long
Dim ws As Worksheet, wsheet As Worksheet
Dim temp As Long
For Each wsheet In ThisWorkbook.Sheets
Set ws = Sheets(wsheet.Name)
LastRow = ws.Range("G" & Rows.Count).End(xlUp).Row + 1
For i = 6 To LastRow
If ws.Range("G" & i).Font.Bold = True And _
Len(Trim(ws.Range("G" & i).Value)) <> 0 Then
ws.Range("G" & i).Offset(, -3).Value = ws.Range("G" & i).Value
If temp <> 0 Then
ws.Range("D" & temp).AutoFill Destination:=Range("D" & temp & ":D" & i - 1)
End If
temp = i
End If
Next i
CLastRow = ws.Range("D" & Rows.Count).End(xlUp).Row
ws.Range("D" & CLastRow).AutoFill Destination:=ws.Range("D" & CLastRow & ":D" & LastRow)
Next
End Sub
=IF(LEN(F6)=3,F6,C5)
regards, barry