If you're looking to do this for row 5 from column B on, then tactps' solution can be amended a bit to this.
It covers text, numeric values and formulas, and executes upon selection of the sheet(s).
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
On Error Resume Next
[B5:IV5].SpecialCells(xlCellTypeConstants).Font.Bold = True
[B5:IV5].SpecialCells(xlCellTypeFormulas).Font.Bold = True
I need to apply the formatting programmaticaly. As new worksheets will be added depending on dates. Therefore when a month changes a new worksheet is created and also then i want to format the cells also.
I want to avoid manually selecting and setting the formatting manually.
Not sure I understand.
You want to format non empty cells in row 5 (except column A) on all sheets, including any newly created ones, as bold font?
If that's right then the code provided will do that. No need to select & manually format. The only thing that needs to be selected is the sheet one time to execute the formatting code, then it stays. (And the sheet selection can be done programatically if you won't be looking at them before printing or something like that.)
If this isn't what you want can you rephrase your request?