It is not necessary to resort to VBA, this can be done using standard Excel.
For example, if you wanted to format an entire row based on the value in column B being > 5.
Select all involved cells in the first row of data (say, it might be A2:F2)
Go to conditional formatting > New Rule
Select the "Use a Formula" option
Enter this formula: =$B2 > 5
Choose your desired Formatting, and complete the dialogue box Ok, Apply, etc
Now make sure A2:F2 is still selected, or select it again.
Click Ctrl+C to COPY
Now select the rest of your cells (below) - say, it might be A3:F20
Right click > Paste Special > Paste Formats
This will paste the conditional formatting in a "relative" / dynamic way - where each row's Conditional Formatting will understand that their format is depending on the value in B# , where # is the row you are on.
This is my standard way of applying conditional formatting that's dependent on the location of the cell.