Jump to content


Photo

Pivot table calculations by cell color


  • Please log in to reply
1 reply to this topic

#1 winner49r

winner49r

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 25 February 2017 - 10:21 PM

I was asked if a table with colored rows can be summarized by % to grand totals off the color cells themselves.  We know Excel can sort by color so can Excel take color as a source of pivoting against?  I attached a sample file in which I added two columns in order to pivot against color as a number will represent the color.  Color as a data source?

Attached Files



#2 Jonathan

Jonathan

    Forums Administrator

  • Administrators
  • 831 posts

Posted 27 February 2017 - 01:05 PM

Hi winner49r,

 

The color of a cell cannot be extracted into a formula, so you cannot treat formatting as data. However, your example contains a column with the words Yellow, Red, Blue and Green. You could use this column as the basis for your pivot table calculations and then use conditional formatting to apply the appropriate colors to the rows.

 

You can see how to use conditional formatting in the video lesson: Essential Skills Lesson 4-15 Use simple conditional formatting.

 

Whenever you find yourself in this kind of situation, the solution is almost always to use conditional formatting to color your rows and use the data itself for your calculations.

 

I hope this is the answer you were looking for, but please feel free to reply if you need any more help with this.


Jonathan is part of the professional team who answer Excel-related questions posted on the ExcelCentral.com forums.
Jonathan also tests our courses prior to publication and has worked on all of our ten world bestselling Excel books for Excel 2007, Excel 2010, Excel 2013, Excel 2016 for Windows and Excel 2016 for Apple Mac. Jonathan has also worked on over 850 video lessons for or video courses covering Excel 2007, Excel 2010 and Excel 2013.
As well as extensive Excel knowledge, Jonathan has worked in the IT world for over thirteen years as a programmer, database designer and analyst for some of the world's largest companies.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users