ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   VLOOKUP code needed please (https://www.excelbanter.com/excel-worksheet-functions/76804-vlookup-code-needed-please.html)

j4ymf

VLOOKUP code needed please
 

hello
i have attached a file so you can see what my problem is
http://www.excelforum.com/attachment...d=114219047 1

what i need to be able to do is calculate all the good and bad figures

can anyone help me with a script

many thanks jason

ie:
35187 Good
17096 Good
4424 Good
3091 Good
2455 Good
2023 Good
1121 Good
691 Good
= 66088 etc

55 Bad
9388 Bad
5620 Bad
3498 Bad
3093 Bad
2120 Bad
1501 Bad
1073 Bad
788 Bad
762 Bad
275 Bad
275 Bad

=28448

so i need a code that looks for all the good and adds them up
and like wise with the bad

thanks


+-------------------------------------------------------------------+
|Filename: VLOOKUP problem.JPG |
|Download: http://www.excelforum.com/attachment.php?postid=4447 |
+-------------------------------------------------------------------+

--
j4ymf
------------------------------------------------------------------------
j4ymf's Profile: http://www.excelforum.com/member.php...o&userid=32389
View this thread: http://www.excelforum.com/showthread...hreadid=521529


davesexcel

VLOOKUP code needed please
 

=SUMIF(B5:B26,C3,A5:A26)
this example
c3 was the criteria ie:Good or Bad

B5:B26 is either good or bad

A5:A26 had the values to add up


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=521529


Richard Buttrey

VLOOKUP code needed please
 
On Sun, 12 Mar 2006 13:15:59 -0600, j4ymf
wrote:


hello
i have attached a file so you can see what my problem is
http://www.excelforum.com/attachment...d=114219047 1

what i need to be able to do is calculate all the good and bad figures

can anyone help me with a script

many thanks jason

ie:
35187 Good
17096 Good
4424 Good
3091 Good
2455 Good
2023 Good
1121 Good
691 Good
= 66088 etc

55 Bad
9388 Bad
5620 Bad
3498 Bad
3093 Bad
2120 Bad
1501 Bad
1073 Bad
788 Bad
762 Bad
275 Bad
275 Bad

=28448

so i need a code that looks for all the good and adds them up
and like wise with the bad

thanks


+-------------------------------------------------------------------+
|Filename: VLOOKUP problem.JPG |
|Download: http://www.excelforum.com/attachment.php?postid=4447 |
+-------------------------------------------------------------------+



A simple SUMIF(B:B,"Good",A:A") will achieve that. Replace Good with
"Bad" for the other condition.

Rgds
__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________

Peo Sjoblom

VLOOKUP code needed please
 
=SUMIF($D$1:$D$50,"Good",$C$1:$C$50)

replace good with bad to get those values as well

--

Regards,

Peo Sjoblom

Northwest Excel Solutions

www.nwexcelsolutions.com

(remove ^^ from email address)

Portland, Oregon




"j4ymf" wrote in
message ...

hello
i have attached a file so you can see what my problem is
http://www.excelforum.com/attachment...d=114219047 1

what i need to be able to do is calculate all the good and bad figures

can anyone help me with a script

many thanks jason

ie:
35187 Good
17096 Good
4424 Good
3091 Good
2455 Good
2023 Good
1121 Good
691 Good
= 66088 etc

55 Bad
9388 Bad
5620 Bad
3498 Bad
3093 Bad
2120 Bad
1501 Bad
1073 Bad
788 Bad
762 Bad
275 Bad
275 Bad

=28448

so i need a code that looks for all the good and adds them up
and like wise with the bad

thanks


+-------------------------------------------------------------------+
|Filename: VLOOKUP problem.JPG |
|Download: http://www.excelforum.com/attachment.php?postid=4447 |
+-------------------------------------------------------------------+

--
j4ymf
------------------------------------------------------------------------
j4ymf's Profile:
http://www.excelforum.com/member.php...o&userid=32389
View this thread: http://www.excelforum.com/showthread...hreadid=521529



j4ymf

VLOOKUP code needed please
 

thanks dave you are the kiddie

just what i needed


--
j4ymf
------------------------------------------------------------------------
j4ymf's Profile: http://www.excelforum.com/member.php...o&userid=32389
View this thread: http://www.excelforum.com/showthread...hreadid=521529



All times are GMT +1. The time now is 12:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com