help with vlookup(ish) problem please?

fry

Active Member
Joined
Apr 25, 2007
Messages
411
Hi All

Sorry about the title, I didn't know how to explain :(

What I'm trying to do is a bit like vlookup but instead of returning 1 value I want to add up all the values???

My array is G7:M240 so what I need to do is look down column H and wherever a value is found (in this case Inbound or Outbound) I want to take the value on that row in column K and then add it to the rest to produce a sum of inbounds or outbounds?

Could someone help?

Thanks a lot! :)
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

fry

Active Member
Joined
Apr 25, 2007
Messages
411
Hi Bitmaster

Please don't hesitate, I'm old and befuddled!! It's been a while since I played with excel.
I'm still a bit unsure of the syntax though :(
 

fry

Active Member
Joined
Apr 25, 2007
Messages
411
I tried...

SUMIF(G7:G240,"Inbound",K7:K240)

but it results in zero?? :(
 

Trevor G

Well-known Member
Joined
Jul 17, 2008
Messages
6,701
Office Version
  1. 2016
Platform
  1. Windows

ADVERTISEMENT

Try SUMPRODUCT like this

Excel Workbook
EFGHIJ
1PeopleValuesPeopleTotals
2John23John138
3Sarah45Sarah270
4Jack56Jack336
5John23
6Sarah45
7Jack56
8John23
9Sarah45
10Jack56
11John23
12Sarah45
13Jack56
14John23
15Sarah45
16Jack56
17John23
18Sarah45
19Jack56
Sheet3
 
Last edited:

baitmaster

Well-known Member
Joined
Mar 12, 2009
Messages
2,039
To work out the syntax, start typing "=SUMIF(" in the formula bar, but before hitting ENTER, hit the fx button just to the left of the formula bar, this brings up the information you need

In your case, try:
=SUMIF(H7:H240,"inbound",K7:K240)+SUMIF(H7:H240,"outbound",K7:K240)
 

fry

Active Member
Joined
Apr 25, 2007
Messages
411

ADVERTISEMENT

SUMIF(G7:G240,Inbound,K7:K240) is also zero and SUMIF(G7:M240,"Inbound",K7:K240) produces a sum of something, but not what I want???
 

fry

Active Member
Joined
Apr 25, 2007
Messages
411
Ooops!!

Told you I was befuddled. Not sure why I used column G when it is clearly column H and I even asked that in my original question????

Time for one of my tablets!!

It does now work, so thank you very much baitmaster and I owe you a beer!!

:)
 

fry

Active Member
Joined
Apr 25, 2007
Messages
411
In fact thanks to all 3 for a lightning fast response!!

:) :)
 

Watch MrExcel Video

Forum statistics

Threads
1,122,469
Messages
5,596,329
Members
414,055
Latest member
mcarduner

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top