Saturday, September 13, 2014

Formula In Cell L2 For Cells L2 To L For Computing Number Of Instances Of G1 G2 G3 Multiplied By Corresponding Number Of Days In Cells I2 To I4

                      Google Spreadsheet   Post  #1761
Yogi Anand, D.Eng, P.E.      ANAND Enterprises LLC -- Rochester Hills MI     www.energyefficientbuild.com.   Sep-13-2014
post by Colder Pressed:
(https://productforums.google.com/forum/#!category-topic/docs/spreadsheets/i7Xz8EqDCP0)
How do I count data multiple times based on a multiplier?
Hello All,

Here's what I have:

ProductBreakdownDaysItemTotal
1 CC (L2)G1F2G4F4G1G31G13
1 CC (CUSTOM)G3G3G4G4G5G5R61G20
2 CC (L1)G3F2G1F4R1N12G34

Let's say Product is col. A and Total is col. M

In col M I'm using

=COUNTIF
in order to get the number of times each item appears in the table

However I'd like all the entries in 'Breakdown' to be counted twice, as dictated by the value in the 'Days' column. So in reality, the count value for 'G3' should be 5, not 4. Likewise, the total value for 'G1' should be 4, not 3.

Here's what I want to do:

ProductBreakdownDaysItemTotal
1 CC (L2)G1F2G4F4G1G31G14
1 CC (CUSTOM)G3G3G4G4G5G5R61G20
2 CC (L1)G3F2G1F4R1N12G35

Is something like that possible?

Thanks in advance for any replies :) 
--------------------------------------------------------------------------------------------------------------------