Friday, July 28, 2023

Repeating Rows at the bottom of each printed excel sheet using VBA

 Sub MyFooter()

Dim StrFtr As String, Rng As Range, Sh As Worksheet, c As Range

Set Sh = Worksheets("Sheet5")

Set Rng = Sh.Range("A55:G55")

For Each c In Rng

StrFtr = StrFtr & c & " "

Next c

ActiveSheet.PageSetup.LeftFooter = StrFtr

End Sub

Hide rows in excel based on cell value using VBA

Sub HideRow()
LineStart = 2
LineEnd = 16
ColumnNumber = 2
For i = LineStart To LineEnd
If Cells(i, ColumnNumber).Value <> "YourCellValue" Then
Cells(i, ColumnNumber).EntireRow.Hidden = True
Cells(i, ColumnNumber).EntireRow.Hidden = False
End If
Next i
End Sub

How to merge a branch to main branch in Github.

In Terminal or Command Prompt:  git checkout main  [switch to main branch] git pull origin main  [grab latest updates from main branch] git ...