Formula referencing conditional formatting

Closed
ConfusedExcelGenius - Jun 4, 2010 at 08:46 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jun 5, 2010 at 07:04 AM
I have a data set that is conditionally formatted to highlight the last row of similair data. There can be anywhere from 1000 to 4000 rows with several columns and it constantly changes so I need something dynamic.

Here is what my data looks like:

Column A Column B Column C

New York $400 4.1
New York $500 5.0 (it highlights this one in conditional formatting)
L.A. $600 6.0
L.A. $750 3.2
L.A. $800 1.2 (it highlights this one in conditional formatting etc..)

What I need is some way to get a weighted average of the two numbers above. So for New York i need "((400*4.1)+(500*5))/sum(500+400)" and the same for L.A. I can do that with a "sumproduct" by hand for a small data set, but when it gets really large and starts to change every other month I need a macro or a formula or something that can look at the name in column A or count up from the conditional formatting and be able to give me that sumproduct dynamically.

I think I've exhausted my knowledge of excel so any help would be appreciated (if my idea is even possible to construct). Thanks all!

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jun 5, 2010 at 07:04 AM
and where this total needs to go ? Does it go to some sort of a summary sheet. Is it on-demand kind of deal or is it more fluild etc


Could you please upload a sample file with sample data etc on some shared site like https://authentification.site , http://wikisend.com/ , http://www.editgrid.com etc and post back here the link to allow better understanding of how it is now and how you foresee. Based on the sample book, could you re-explain your problem too
0