sum of a named range with values based on vlookup results
Note that if you use the LOOKUP function your lookup_table *must* be sorted
in ascending order based on "size".
--
Biff
Microsoft Excel MVP
"Shane Devenshire" wrote in
message ...
Hi,
Let's suppose that the formula in column B reads
=VLOOKUP(A1,Table,2,FALSE)
(you didn't show us the formula)
You can get the whole result by using the following Array formula:
=SUM(LOOKUP(Size,Table))
Press Shift+Ctrl+Enter to enter this formula. Or if you don't want to use
the array form then
=SUMPRODUCT(LOOKUP(Size,Table))
If the lookup values are not in the last column of the table range then
use
=SUM(LOOKUP(Size,A1:A10,B1:B10))
Where A1:A10 is the lookup column of the Table and B1:B10 is the column
containing the values you want to return. This is and array function.
--
If this helps, please click the Yes button
Cheers,
Shane Devenshire
"Solutions Manager" wrote:
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.
|