title: VBA - How to change colour of no. of columns based on value in cell?
body: <p>Can anyone please help as I'm new to Excel VBA?</p>
  
  <p>My requirement is to change colour of a range of cell based on value in a particular cell.</p>
  
  <p>e.g. if I've cell B8 with value 2 then change the background colour of B9:B11 to red and C9:C11 to red.</p>
  
  <p>and say if the cell B8 has value 3 then change the background colour of B9:B11 to red, C9:C11 to red and then D9:D11 red.</p>
  
  <p>The range expands to B9:E11 for value 4 and so on. So need a VBA code, Conditional formating for 100 value will not be time effective I guess.</p>
  
  <p>How do I do this?</p>
  
  <p>Thanks 
  Amrik</p>