Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Joe
 
Posts: n/a
Default vlookup and countif???

help I am trying to write a formula that says the following.

if coloum a = main and if coloum b = yes please count the yes's

I have tried using vlookup and count if but I just get a null value returned

hope there is somebody there who can help

thanks


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Aladin Akyurek
 
Posts: n/a
Default vlookup and countif???

=SUMPRODUCT(--($A$2:$A$100="Main"),--($B$2:$B$100="Yes"))

Joe wrote:
help I am trying to write a formula that says the following.

if coloum a = main and if coloum b = yes please count the yes's

I have tried using vlookup and count if but I just get a null value returned

hope there is somebody there who can help

thanks


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Joe
 
Posts: n/a
Default vlookup and countif???

Hello

I have tried to us this formula but it returns a #NUM! value.

I am trying to count no sum the cells

Thanks
--
Cheers


"Aladin Akyurek" wrote:

=SUMPRODUCT(--($A$2:$A$100="Main"),--($B$2:$B$100="Yes"))

Joe wrote:
help I am trying to write a formula that says the following.

if coloum a = main and if coloum b = yes please count the yes's

I have tried using vlookup and count if but I just get a null value returned

hope there is somebody there who can help

thanks



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dav
 
Posts: n/a
Default vlookup and countif???


Only a slight ammendment
=SUMPRODUCT(($A$2:$A$100="Main")*($B$2:$B$100="Yes "))

I have enclosed the yes in " but it displays with a space above, it
should not be there! just "yes"

The conditions return a list of true and false, if they are multiplied
together you get
true x true =1
true x false =0
false x true =0
false x false=0

So it only sums the values when its true

The original formula tries to sum text and is not happy hence #num

Regards

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=520293

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Joe
 
Posts: n/a
Default vlookup and countif???

=SUMPRODUCT(('Next Ref No - 1st Qtr'!E:E="main")*('Next Ref No - 1st
Qtr'!K:K="yes"))

thank you so much for your response, i am now putting in the above formula
but i am still getting #NUM!

What am i doing wrong?

thanks
--
Cheers


"Dav" wrote:


Only a slight ammendment
=SUMPRODUCT(($A$2:$A$100="Main")*($B$2:$B$100="Yes "))

I have enclosed the yes in " but it displays with a space above, it
should not be there! just "yes"

The conditions return a list of true and false, if they are multiplied
together you get
true x true =1
true x false =0
false x true =0
false x false=0

So it only sums the values when its true

The original formula tries to sum text and is not happy hence #num

Regards

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=520293




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dav
 
Posts: n/a
Default vlookup and countif???


Sumproduct does not work with column references, If your first row is
column headings replace.

E:E with e2:e65536 should your range need to be this long, an similarly
for K:K

Regards

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=520293

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forget SUMIF, COUNTIF and VLOOKUP Pierre Leclerc Excel Worksheet Functions 16 April 27th 23 11:51 AM
Countif + vLookup: Can they work together? Spyder Excel Discussion (Misc queries) 3 February 24th 06 12:27 PM
Countif or Vlookup praveen_khm Excel Worksheet Functions 1 February 3rd 06 08:17 PM
Countif? or Vlookup? Lost?? leo Excel Worksheet Functions 3 November 30th 05 02:17 PM
vlookup, sumif, if, countif, help chintu49 Excel Worksheet Functions 0 May 26th 05 03:00 PM


All times are GMT +1. The time now is 08:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"