# Summarizing Data With Vlookups Or Sumproduct Formulas

May 19, 2007

I've got a tab with 32K+ lines of data in six columns. I need to be able to summarize it in a table based on two criteria (e.g. Region, Line of Business). I am currently using 16 sumproduct formulas (=sumproduct((type=a5)*(reg=a4)*revenue)) where type is the line of business and reg is the region column, and 8 vlookups per region. Each tab will have about 8 regions and I'll have 4 tabs. As you can tell, this spreadsheet will quickly get out of hand in terms of calculating speed. I can't really use a pivot table because of: 1) formatting constraints 2) the vlookups refer to a separate tab than the main data dump. What alternatives do I have other than array formulas to get the data in a nice little summary form? The formulas/presentation aren't very complicated, but I have yet to come up with a good alternative to the above.

ADVERTISEMENT

## Summarizing Raw Data

Oct 28, 2009

I was asked at work to create a report that takes raw data from a questionnaire and compiles it in an easy-to-read report. (Little do they know that this is how I'm such a wiz at excel ;-) )

It seems pretty simple, but I can't seem to figure it out! On the attached workbook, the first spreadsheet,"SUMMARY", is the jist of what the report should look like - the average score for each question by floor. On the next spreadsheet, "RAW DATA", is a sample of what the raw data looks like - just a list of each room number and the score it received by question. the first 2 digits of the room number signify the floor (ex. 201=2nd floor, 1215=12th floor, etc.).

My major issue was with getting the score for each floor without having to manipulate the raw data - this report will eventually become a shell that can be used with new data every month. Is there a way to make a range equal a number (ie. 200-299=2)?

## Summarizing The Data

Jul 12, 2009

First sheet is comprised of 12 grouped cells. Each group consist of 7 rows and 6 columns
the above mentioned groups are bwoke down with 6 lines of data and 7th row is totals of the 6 boxes.

Each gtoup will have totals, even if they run over to next group
The first column is a task number, which will be the main component. A task number can be used multiple times and can run over to next group of cells

Here is an example of above mentioned sheet
task# Start time end time Description
999.......15:00.......15:05.........Open Mail
999........16:05.......16:55........sort claims

A new task number will move to the next group of cells
748........15:05.......16:05.........23 inches

2nd sheet will be a time tracking sheet. Here is the info from this sheet
999......15:00.....15:05.....open Mail
748.......15:05.....16:05......23 inches
999........16:05.....16:55......sort claims

The 2 sheets look alike but on first mentioned sheet info is broken down by task number

## Summarizing Sales Data

Feb 26, 2009

I'm stumped on what I know is a pretty basic problem. Maybe i'm just trying to over think it.

I have a table of sales data...One field is the date it was sold, one field is the amount it sold for. The date field isn't in order and it contains dates over the past 12 months. I need a way to total the amount of sales in each month and not through a pivot table. I am able to count how many entries there are, but I can't find a easy way to do a count of how much was sold in each month.

## Summarizing Sets Of Data (sumif?)

Jul 8, 2009

Sheet1 contains a large set of data, including a date and a corresponding value.

Sheet2 (Summary) has a column called "Begin Date" and a column called "End Date". How can I use a formula to sum every piece of data that fits within the two dates?

## Summarizing Data From Multiple Tabs?

Dec 26, 2012

I have a spreadsheet with 12 tabs, 1 for each month in the year. On each tab I have employee names (column A), followed by the premium they pay for their health insurance (column B). I'm attemting to create a list of each employee and how much they paid for helath insurance over the year. Since employees come and leave thorughout the year, the lists aren't the same on each tab. However, I was able to create a master list of all possible employees and placed this list into a new tab.

I'm vaguely farmiliar with the SUMIF function and I believe that this would be the best approach, or some possibly sort of vlookup.

## Removing Duplicates In One Column And Summarizing Data

Feb 9, 2012

I have a 5 column document with about 3000 entries that I need streamlining. THe first column is a student's name, then grade. The next 2 columns are for Honour Roll Standing (A or B) and/or an Effort Honour Roll Standing (E). Finally there is also a "term" column indicating if they received this award is Term 1, 2 or 3.

An example source file is found here: [URL]...

As you can see, there are many students who have received an award in all 3 terms, however there are also some students that only received standing for 1 or 2 terms.

I need to manipulate the data so that there are no duplicate names and all the data regarding Honour Roll standings and which term it occured in are all laid out in one row per student.

IDEAL COLUMN HEADINGS:

NAME | Grade | Term1 HonourRoll | Term1 Effort | Term2 HonourRoll | Term2 Effort |

etc etc etc

## Macro For Counting / Summarizing Data Per Month

Apr 21, 2012

Here is the attached Excel file and the following is the desired output of the macro:

1.) List the data (Names) of the Columns D (Input), F (Analyze), and H (Output) in Sheet1 to Column A (Name of Person) in Sheet2. There should be no repetition of two names.
2.) Count the number of entries of each person in the Column D (Input) in Sheet1 appears per month (basis is the Input Date column E) and record into the corresponding month in Sheet2 under the Input Header.
3.) Add the total of the 12 months in the YTD column under the Input Header.
4.) Repeat steps #2-3 for the Column F (Analyze) and Column H (Output) of Sheet1 with the results recorded in their corresponding headers in Sheet2.
5.) Note: The data in Sheet1 is a running data and continually adds up as the current year goes by. If there is a way the macro could take that into account it would be much better.

HERE IS THE LINK OF SAMPLE FILE: [URL]

## Summarizing Data To Collect Attributes From Multiple Instances

Oct 27, 2013

My company would receive RFQs from potential customers inquiring the availability of different products, and we are trying to summarise these requests to find a trend.

Each product has several attributes, such as descriptions, keywords, manufacturer's code, etc. The RFQs are all different, with each request providing some attributes while missing others. The only reliably uniform attribute is the product number.

I am trying to build a database with the maximum amount of details on each requested product, therefore consolidating the different requests. I already put the source data on the same sheet and sorted the product numbers. I also know how many instances there are for each product number. In other words, my data look like this:

Product number (sorted)
Repeat count
Attribute 1
Attribute 2

111a
2
aaaa

[Code] .........

Note:
1. The product numbers and repeat count are reliable
2. All the attributes are valid, i.e. as long as one can fill a blank I would take it
3. If none of the instances provide a certain attribute, it is acceptable for it to be left blank

And I am trying to turn it into this:

Product number
(sorted)
Repeat count
Attribute 1
Attribute 2

111a
2
aaaa
bbbb

123456
1
abcde

100x
3
123456
wxyz

I already spent a whole day trying to do it with MATCH, OFFSET, VLOOKUP etc to no avail. It seems I would need some kind of VBS with loop and array functionalities that are beyond me.

## Too Many Sumproduct Formulas Causing Slowdown

Aug 27, 2009

I want to say thanks for any help you might be able to offer. Attached are 2 sheets out of a workbook I am using which has many sumproduct formulas. On the the Input sheet, is where vacation and training forecast dates are listed. On the Calcs sheet, there are 2 monthly calendars for the year, 1 for vacation, the other for training. Would like to know if there is a way to have both records show up on only one calendar set. I currently have the vacation shown as a '1' and the training shown as a '9'. The workbook is used in Excel 2003 & 2007.

## SUMPRODUCT Formulas Slowing Down Calculations

Feb 22, 2008

I am doing a report which analyzes a specific person's transaction per country (3 criterias). The workbook has 3 sheets. First sheet is the database, 2nd is the report itself and 3rd is a reference table. I am using a sumproduct formula to count per person's transaction per country. It is giving me slow calculations.

I cannot possibly use a pivot table since there will still be other calculations involved after determining the transactions. I tried using database functions but i can't seem to understand how to go about it when there are multiple criterias involved.

I am attaching a sample file for your reference.

## SUMPRODUCT Formulas Slowing Worksheet Significantly

Jan 22, 2009

I have had a workbook that I have been using to track inventory. I use a userform to enter the data for inventory in and out of the system. I recently added two more worksheets to the workbook, each of which has several SUMPRODUCT formulas on them that reference the inventory data.

Since adding these two sheets, when entering data via the userform, it takes a long time (relatively speaking) for the sheet to update with the relevant new data. I have attached a copy of the file, in hopes that someone can show me exactly what is causing the slow-down, and if there is a way that I can get the same results using different programming or formulas that will not be so slow.

The part that is slow is on the "Data" sheet. Click on the green or orange buttons to open the userform. Make a selection in each section, and enter an amount. Clicking on "Enter" will transfer the appropriate information to the worksheet. This is the part that is slow.

## Copying Sumproduct Formulas Between Worksheets Causes Errors

Oct 19, 2007

I was kindly provided with a formula from this forum a few months ago (in the attached workbook) to calculate the area under the curve of strings of data of varying length (i.e. different number of rows) these strings of data are aligned with a timeline (providing the Y and X axis for the curve respectively). The formula is able to calculate the area under these curves without the need for adjustment to the number of rows of the dataset.

However I have now tried to copy this formula to a new datasheet with a different total number of rows and a timeline fixed (of different intervals) in column A (rather than moving for each string of data) and I am receiving a #N/A error. I am sure that I have copied the formula correctly. Can anyone help fix my formula so that it calculates area under the curve again? I would like it to calculate the area under the curve for the data in the same column but using the fixed timeline in column A.

The working formula is on the sheet ‘original formula layout’ and the formula containing the error is on the sheet ‘new formula layout’.

## Database Functions Vs. Array Formulas Vs. SUMPRODUCT Vs. Pivot Tables

Dec 13, 2006

All I am doing is counting text values in a table.

The table has 3 main columns(which are relevant to this thread anyway).

Shift - Area - Status

The example I have attached shows examples of DCOUNTA, SUMPRODUCT and a Pivot Table.

I have read many threads stating that the best one to use is Pivot Table followed by DCOUNTA followed by SUMPRODUCT.

The most effective for me seems to be SUMPRODUCT (although this does slow excel down dramatically when you use a lot of these formulas). As do Array Formulas

The Pivot Table does not update on its own, therefore constantly needs to be refreshed. (I could use code to do this)

The DCOUNTA seems to be the least effective at doing what I want (unless I am doing something wrong)

In the attached example can the DCOUNTA be used more efficiently as I don't like the fact that I am duplicating rows to apply the criteria for a different shift. e.g

Area 1 - Late Shift - Banned
Area 1 - Early Shift - Banned

I want my table to be as follows (as the SUMPRODUCT shows)

AREA - Early Shift - Late Shift - Night Shift - Area Total
Area 1
Area 2
Area 3
Area 4
Area 5

Shift Total

## Summarizing List Of Data Which Covers List Of Orders?

Mar 31, 2014

See attached spreadsheet. It's an imaginery list of orders. Raw data on the left, summary on the right.

F is a reduced list of A, G is how many times each appears in A. H is supposed to be the total values of each order, ie quantity in B * value in C.

How do I calculate H?

## Formulas To Hide Partial Concatenate Data And Determining Two Other Formulas

Dec 11, 2013

I'm trying to automate creating certain keyword combinations I need, based off of the values I input into reference cells in columns A - E; the goal is to compile a list of keywords which I will then use to track my rankings in search engines.

I'm looking to only output 500 keywords, so some of the cells in columns A, B, C & E will not contain data (column D will always have a primary Geo-target listed). This results in some of the concatenate formulas I've created outputting partial data (i.e. if there is no data in cell A10, and cell D2 contains the word "Knoxville", then cell I10 will output the data, "Knoxville "). How can I setup conditioning formatting or a formula so that these auto-generated cells appear blank if one of the reference cells has no data within it?The reason why I need the above to work is because I want to setup a formula that automatically counts the # of keyword combinations created by the data entered into any of the reference cells. With the partial combinations being listed, it skews my data. Which leads me to my next question: what is the best formula for counting the # of cells containing a full keyword combination from any of the cells listed in columns G - O (minus the data in the header cells; i.e. G1, H1, etc...)?Lastly, is there a formula I could use that would then aggregate all of the full keyword combinations within the "Complete Keyword List" column (column P)?

## If And Sumproduct Formulas: Calculate The Number Of Instances Of "CU"

Mar 30, 2009

I have a sheet that contains rows containing letter codes for example "CU". This is generated by an IF formula i.e. If true = "CU". However I need to be able to calculate the number of instances of "CU" but sumproduct will not work as it sees the cell as containing a formula not the result i.e. "CU". Sumproduct code:

## Summarizing From Other Worksheets

Jul 10, 2012

I have many sheets in a workbook (Sheet1, Sheet 2 etc), and I am trying to create a final summary sheet (Summary).

In cell A1 of the summary sheet, I want the information from Sheet1-A1 to be transposed (so =Sheet1!\$A\$1).

In cell A2 of the summary sheet, I want the information from Sheet2-A1 to be transposed (so =Sheet2!\$A\$1).

I've tried to drag/drop the formula on the summary sheet, but I can't seem to make it change the worksheet and not the cell.

I don't want to have to manually input the formula for each cell.

## Summarizing By Date

Aug 7, 2007

I have a basic bookkeeping workbook with multiple sheets each representing a differenct account. In each sheet, an entry is entered on a row with main columns being date, credit (where a positive amount goes), debit (negative amount goes), and then a series of columns representing the type of credit or debit where a simple "x" is placed.

This style has worked well in the past becuase we merely just sort by column and the "x"s clump all credit or debit types together and we just sum them at years end.

However, we are now trying to have the numbers report to a main sheet that will summarize them monthly; basically where the first column is all the different types of credits and debits and the next 12 columns are the months.

We know how to refference the other sheet to get the data, but where it gets complicated is summarizing ALL the sheets together since they all have varying number of entires per month.

Is there some sort of way I can write a formula (or series of formualas) that will allow it to collect all the data from one sheet by only looking at the month column, and add that up, and then do the same for each sheet?

## Formula For Summarizing Various Columns?

Feb 18, 2014

I would usually do this in a pivot table (which works fine) but I need something else as the person I am passing this on to will not know how to change the range and this 1 report is a part of a larger report which should just be as simple as: Data download >>> calculations run automatically >>> print

I need to sum up various bits of information. The attached file is the example. The DATA tab holds the information and the REPORT tab shows the column headers that I am after. These columns are as below:Contractor Name: The formula should look through the DATA tab and bring back a contractor nameApproved Quotes: Then taking the name from the above field, the formula should add up column T where column AP = YesApproved WO Count: This one should just add up how many rows the above total is made of.Rejected Quote: Then taking the name from the contractor field, the formula should count add up column T where column AP = NoRejected WO Count: This one should just add up how many rows the above total is made of.

The PIVOT EXAMPLE tab holds the example with the red highlight being excluded.

## Summarizing Values From Other Sheets

Oct 3, 2008

In the first sheet (EQ MOVES) I have:
Column A contains a list of some 300 different pieces of equipment.
Column D is where the foremen enter the job number (4 digits) and job name of where the foreman wants the equipment to go the next day.

In the second sheet (PERSONNEL MOVES) I have:
Column A contains all employee names.
Column D is where the foremen enter the job number and job name of where the foremen want the employees to go the next day.

In the third sheet (SUMMARY) I have:
A box in A1 where I type in a job number (4 digits) but no job name.
A2 says "EQUIPMENT and B2 says "PERSONNEL".
A3 and below should list all equipment to go to that job listed in A1.
B3 and below should list all personnel to go to that job number.

## Deleting Rows When Summarizing

Nov 23, 2008

I have a master worksheet and 4 scenarios. The master worksheet has all the details and I need to extract each scenario into separate worksheets. I can "if" a statement to pull only those rows that have "x" in a scenario but how can i delete all the rows that do not have a corresponding "x" for that scenario?

In essence, how do i extract only the info for a particular scenario without having to go back and delete the empty rows?

## Summarizing Attendance Sheet

Oct 4, 2009

in range B9:B187 I have names and I have their attendance in I9:AM187
I have all the dates in I8:AM8

attendance codes are PL SL CL LWP TRG & P. I want to segregate all PL SL CL LWP and TRG

I want the output in a different sheet where in column A I will should get name, in column B I should get type "SL PL CL LWP TRG", in column C I should get start date and in column I should get end date.

## Summarizing To New Worksheet (Runtime ERROR 9)

Dec 6, 2009

I have a Petty Cash Workbook that consists of a Cash Receipts worksheet, and two separate credit card worksheets. I would like to be able to summarize the data from these three worksheets to a fourth worksheet called “Yearly Totals”. I’ve copied and modified code from Ron deBruin’s website but I’m not getting anywhere with it. I’m constantly running a Runtime ERROR 9 with this line:

## Summarizing Selected Entries In A Table?

Apr 26, 2013

I wold like to summarize values of a certain numbers of enties (eg. 5), on a specific criteria, but discarging earlier entries of the same criteria. An example being:

Entry
Value
Entry A
1

[Code]....

If I would like to summarize the values from Entry A, but firstly do so from number three entry buttom-up, and only the prior five values, how could this be done?

## Summarizing Function That Will Filter By Product Key And Date

Aug 5, 2014

I created a large table with data (1700 lines long) and am looking to create a sheet that will use it to do a call for totals whilst filtering for a specific line.

This is what I have currently, filtered by delivery date and key ("furniture desc").

The 58 and 54 are totals for that particular product which I would like to ideally see on a separate sheet.

result1.JPG
result 1a.JPG

What I would like to achieve is this: result2.JPG

What kind of formula would I need to use to first filter by date, then by key, then to tally up the quantities and drop them on another sheet?

Bearing in mind that other keys are intertwined on the Y axis so I can't use =SUM(xx:xx)

## Vlookups In VBA

Mar 26, 2008

I have an array (partArray) that contains a number of parts that I need to get values for. The part array is populated (Thanks Norie!) by bring in the contents of a cell and splitting them into array elements. I then run them through a trim loop to remove the white spaces. Up till here thefunction works fine.

I created a partRSL array to hold the matching value for each part ( I know i can use multidimensional arrays but i dont understand them yet and need to deliver a prototype to get some approval from senior mgmt ).

The idea is that as we run through each element of the partArray we will vlookup the corrseponding value and assign it to the appropriate element of the partRSL.
When I use the function below it returns a #value. I think that the element of the partArray i want to lookup is not being used as a string and so the lookup is failing.
As a test to see that this is working i have the function returning the value of element 0 in the partRSL array as it is distinct from the rest. (It should be returning a number (integer)

Function FindAlt(option_address)
' Initialise the array
Dim partArray() As String
Dim partRSL() As String
Dim i As Integer

'Populate Array by spliting the comma separated contents of the select cell and assigning each to an array element
partArray = Split(option_address, ",")

'This works fine
For i = LBound(partArray) To UBound(partArray)
partArray(i) = Trim(partArray(i))
Count = Count + 1
Next

## UDF - Combining VLookups

Dec 17, 2012

I am trying to write a UDF function where I lookup if a value is on a range on different sheet. I would like to be able to write what I want the result to be in the function. I also hard coded that the function need 3 range and 3 results, but I know it is possible the make the number of component vary depending on what the user writes. I would like my function to do that.

Here is what I have written so far :

VB:
Function find_para2(var As String, rng As Range, result1 As String, rng2 As Range, result2 As String, rng3 As Range, result3 As String)
If WorksheetFunction.IsNA(WorksheetFunction.VLookup(var, rng.Address, 1, False)) = False Then
find_para = find_para & result1 & ", "

[Code] .....

## Hyperlinks And Vlookups

Jan 31, 2013

I need returning a working hyperlink from a vlookup. I have a table with part #'s and hyperlinks. On another tab I want to type in a part number, have it search the table and return the working hyperlink. This will allow the user to just click it and go to that tab.

Here is my example spreadsheet : Book1.xlsm

## Vlookups Retruning #n/a

Dec 17, 2008

I have a vlookup for one cell into another sheet however it retruns #n/a(cell A1) the cell adjacent is an if command (Cell B1) it reads if(b1>0,1,0) the only problem is if the cell (A1) will not return zero just #n/a how can I turn the #n/a into a zero? so cell A1 will return a zero and not #n/a

Copyrights 2005-15 www.BigResource.com, All rights reserved