Computing.Net > Forums > Office Software > SUMIF or VLOOKUP? a range of cells

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

SUMIF or VLOOKUP? a range of cells

Reply to Message Icon

Name: confused725
Date: November 21, 2007 at 09:16:30 Pacific
OS: XP
CPU/Ram: Athlon XP2100
Comment:

Hi,

I'm trying to perform a VLOOKUP or SUMIF on a range of data in another sheet.

Eg Sheet 1 is where i the formula is.

Col C
ValueName (formula)

Sheet 2 has my data on, in the format:-

A B C D E
ValueName 2 4 2 2 2

I can obviously lookup against a single Column, eg B and return the value "4" with the following formula.

=SUMIF('sheet2'!$C:$C,Valuename$C:$C,'Sheet2'!$B:$B)

However, what i want to do is lookup the sum of A-E to return the value "12"

I'm sure there is a simple way to do it but cant think of it at the moment, so can anyone help?

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: DerbyDad03
Date: November 22, 2007 at 22:42:37 Pacific
Reply:

Maybe it's just because I'm groggy from a big Thanksgiving meal, but I gotta admit that I have no clue what you are asking for.

Let's start with this:

"Eg Sheet 1 is where i the formula is."

What does "where i the formula is" mean?

Next:

Col C
"ValueName (formula)"

What does this mean? I don't know of any function called "ValueName"

Let me take a guess: Are you trying to search a range of values in A - E and find a set of values from a single row that sums to 12?


0

Response Number 2
Name: jon_k
Date: December 5, 2007 at 11:46:51 Pacific
Reply:

you can use sumif(sheet2!A:A,C1,Sheet2!B:B)+sumif(sheet2!A:A,c1,sheet2!C:C)+sumif(sheet2!A:A,c1,sheet2!D:D) etc etc.

But it ain't ideal.

Another option is using INDIRECT - if each field only appears once in the data sheet, you can just use

=sum(indirect("sheet2!B"&match(C1,sheet2!A:A,0)&":E"&match(c1,sheet2!A:A,0))

failing that, I'm sure there is something you can do with sumproduct, but I can't remember the right syntax for that


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: SUMIF or VLOOKUP? a range of cells

*Color range of cells, merge cells* www.computing.net/answers/office/color-range-of-cells-merge-cells/5624.html

transfering a row of cells between sheets www.computing.net/answers/office/transfering-a-row-of-cells-between-sheets-/9440.html

Sum a variable range of cells?? www.computing.net/answers/office/sum-a-variable-range-of-cells/6931.html