Forum Discussion

David James's avatar
David James
Copper Contributor
May 03, 2017

Conditional Formatting

I have a column with location data (5 different locations) and when I choose a location the cells in that column change fill colour. This is easy. What I want to do is then change the fill colour in every cell along the row in a table (of about 15 columns wide) to the same fill colour depending on the location I have chosen in the first column. Any ideas ?

  • Select the cells which you want to format.
    Example A1:Z100

    Go to Conditional formatting ->
    Use a formula to determine which cell to format.
    Enter the formula
    =IF($A1="India",1,0)

    In Format, select the required colour.

    Do let me know if any clarification or further information is required.

    Vijaykumar Shetye,
    Spreadsheet Excellence,
    Panaji, Goa, India
    • vijaykumar shetye's avatar
      vijaykumar shetye
      Brass Contributor
      Select the cells which you want to format.
      Example A1:Z100

      Go to Conditional formatting ->
      Use a formula to determine which cell to format.
      Enter the formula
      =IF($A1="India",1,0)

      In Format, select the required colour.

      Repeat the same formula for other countries.
      Only change the format colour.

      Do let me know if any clarification or further information is required.

      Vijaykumar Shetye,
      Spreadsheet Excellence,
      Panaji, Goa, India
      • David James's avatar
        David James
        Copper Contributor

        THanks for your reply. Excel didn't like the IF statement. It seems it is not required.

        Regards

  • Logaraj Sekar's avatar
    Logaraj Sekar
    Steel Contributor

     

    Conditional Formatting will only apply colors pre-defined by you.

     

    By creating a Macro, it is possible to apply customized colors will be applied to the respective rows (based on location).

     

    Eg. INDIA, USA, UAE, AUS, AFRICA are 5 locations.

     

    By using macro, if you apply color you want to that any location of above, it will apply colors to the respective rows for that location.

     

    If you apply (green) to INDIA, it will apply green color to the rows where location is INDIA.

     

    Which way you want Macro or Conditional Formatting(without Macro)?

Resources