View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Solutions Manager Solutions Manager is offline
external usenet poster
 
Posts: 27
Default sum of a named range with values based on vlookup results

Here is the specifics.
The worksheet is named "sales" and I have another worksheet named "storebox"
with a table named "tbl.specs". The table contains adcodes sorted in
ascending order with various columns of data about each such as the page
count value.

In the sales spreadsheet the ad sizes are in column C. I have my current
page count VLOOKUPS are in column "AA" (named sb.pages). Here is the formula
for a typical row:
=IF(ISBLANK(INDIRECT("c"&ROW())),"",VLOOKUP(INDIRE CT("c"&ROW()),tbl.specs,2,0))

I have another sheet named MSR with a list of stats, among which is the page
count. That formula is:
=SUM(sb.pages).

So does this help? I hope to eliminate the sb.pages column (AA) and just
have the formula in the MSR sheet give me the page count by looking at the
values in the size column and summing the pagecount of each individual cell
in the named range "size".

Thank you for all of your help. I assume I cannot post the actual workbook?

"T. Valko" wrote:

Let's see if I understand this...

Based on your posted sample, you want a single cell formula that returns
1.75?

Where's your lookup table?

Try this replacing the references with your own:

=SUMPRODUCT(--(ISNUMBER(MATCH(lookup_table_column_1,SIZE,0))),lo okup_table_column_with_Page_Count_values)

--
Biff
Microsoft Excel MVP


"Solutions Manager" wrote in
message ...
I have been poking around and can't seem to find what I am looking for so
here goes. In Excel 2003, I have a spreadsheet with two columns in
particular. For this example, Column A is called Size. The values entered
are
alphanumeric ad codes. Column B is called PageCount. The values are the
numerical result of a VLOOKUP of the Size code. (I have a table that lists
all the adcodes and resulting info) Below is example of the codes and
their
numerical pagecount values:

Size PageCount
4-s .25
2-hf .50
1-bc 1.0
crawl 0

The question is as follows. Right now I add the PageCount column to sum
sizes. Is there a way to use a single formula to SUM the Size column with
the
Values being those in the PageCount column? I am trying to eliminate the
PageCount column alltogether because the results always end up in one cell
anyway. Hopefully this isn't poorly worded.