how to count#cells w/= value in other column and not count blank c

In column A, I have values equal to either YES, NO or NA.  In column B, I 
have values equal to either YES, NO or NA.  I want to count the # of cells in 
column B that equal to their counterpart in column A, but I do not want to 
count blank cells, ex:
	A	B
1	Yes	Yes
2	No	No
3	NA	No
4		
5	Yes	Yes
6	Yes	Yes
7		
8	No	No
9	No	No
Result for B10 should be 6 as I do not want to count row 4 and row 7

thanks in advance!
0
Utf
4/8/2010 11:23:01 AM
excel.worksheet.functions 4936 articles. 2 followers. Follow

5 Replies
938 Views

Similar Articles

[PageSpeed] 5

=SUMPRODUCT(--(A1:A9=B1:B9);--(NOT(ISBLANK(A1:A9))))


-- 
Regards!
Stefi



„aganoe” ezt írta:

> In column A, I have values equal to either YES, NO or NA.  In column B, I 
> have values equal to either YES, NO or NA.  I want to count the # of cells in 
> column B that equal to their counterpart in column A, but I do not want to 
> count blank cells, ex:
> 	A	B
> 1	Yes	Yes
> 2	No	No
> 3	NA	No
> 4		
> 5	Yes	Yes
> 6	Yes	Yes
> 7		
> 8	No	No
> 9	No	No
> Result for B10 should be 6 as I do not want to count row 4 and row 7
> 
> thanks in advance!
0
Utf
4/8/2010 11:41:02 AM
Hi,

How about 

=SUMPRODUCT((A1:A9=B1:B9)*(NOT(A1:A9="")))


-- 
Sweep
------------------------------------------------------------------------
Sweep's Profile: 1611
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=193941

http://www.thecodecage.com/forumz

0
Sweep
4/8/2010 11:42:22 AM
Try the below

=SUMPRODUCT(--(A1:A9=B1:B9)*(A1:A9<>""))

-- 
Jacob (MVP - Excel)


"aganoe" wrote:

> In column A, I have values equal to either YES, NO or NA.  In column B, I 
> have values equal to either YES, NO or NA.  I want to count the # of cells in 
> column B that equal to their counterpart in column A, but I do not want to 
> count blank cells, ex:
> 	A	B
> 1	Yes	Yes
> 2	No	No
> 3	NA	No
> 4		
> 5	Yes	Yes
> 6	Yes	Yes
> 7		
> 8	No	No
> 9	No	No
> Result for B10 should be 6 as I do not want to count row 4 and row 7
> 
> thanks in advance!
0
Utf
4/8/2010 11:47:01 AM
Thanks, all three suggestions work!

"Stefi" wrote:

> =SUMPRODUCT(--(A1:A9=B1:B9);--(NOT(ISBLANK(A1:A9))))
> 
> 
> -- 
> Regards!
> Stefi
> 
> 
> 
> „aganoe” ezt írta:
> 
> > In column A, I have values equal to either YES, NO or NA.  In column B, I 
> > have values equal to either YES, NO or NA.  I want to count the # of cells in 
> > column B that equal to their counterpart in column A, but I do not want to 
> > count blank cells, ex:
> > 	A	B
> > 1	Yes	Yes
> > 2	No	No
> > 3	NA	No
> > 4		
> > 5	Yes	Yes
> > 6	Yes	Yes
> > 7		
> > 8	No	No
> > 9	No	No
> > Result for B10 should be 6 as I do not want to count row 4 and row 7
> > 
> > thanks in advance!
0
Utf
4/8/2010 10:32:01 PM
You are welcome! Thanks for the feedback!

Clicking the YES button will be appreciated.

-- 
Regards!
Stefi



„aganoe” ezt írta:

> Thanks, all three suggestions work!
> 
> "Stefi" wrote:
> 
> > =SUMPRODUCT(--(A1:A9=B1:B9);--(NOT(ISBLANK(A1:A9))))
> > 
> > 
> > -- 
> > Regards!
> > Stefi
> > 
> > 
> > 
> > „aganoe” ezt írta:
> > 
> > > In column A, I have values equal to either YES, NO or NA.  In column B, I 
> > > have values equal to either YES, NO or NA.  I want to count the # of cells in 
> > > column B that equal to their counterpart in column A, but I do not want to 
> > > count blank cells, ex:
> > > 	A	B
> > > 1	Yes	Yes
> > > 2	No	No
> > > 3	NA	No
> > > 4		
> > > 5	Yes	Yes
> > > 6	Yes	Yes
> > > 7		
> > > 8	No	No
> > > 9	No	No
> > > Result for B10 should be 6 as I do not want to count row 4 and row 7
> > > 
> > > thanks in advance!
0
Utf
4/9/2010 10:36:01 AM
Reply:

Similar Artilces:

double clicking and draging a column in a chart to chg data
in Excel 2003, double clicking on a column in a chart and then dragging the column up or down would change the data in a table upon which the chart depended. How does one do this in excel 2007? Tom Hi, That feature has been removed in 2007, there is no way to do it. If this helps, click the Yes button. -- Thanks, Shane Devenshire "Tom of inns" wrote: > in Excel 2003, double clicking on a column in a chart and then dragging the > column up or down would change the data in a table upon which the chart > depended. > > How does one do this in excel 2007? &g...

Can you insert a picture into a specific cell?
Or do they only "float" on the page. Marc They float over the worksheet, but you can adjust the size so that it seems to fit a cell exactly. If you insert a picture, you can hold the alt-key down while you move/resize the picture. When it gets close to the edge of a cell, it'll snap-to that edge. Marc wrote: > > Or do they only "float" on the page. > > Marc -- Dave Peterson ...

transfer data from multiple columns to singlr column
I have data in form a d g b e h c f i (but larger scale) and I need it in a single column going a to z. Hi, highlight you data, copy, go to the column where you want to see the data, paste special, transpose "lc85" wrote: > I have data in form a d g > b e h > c f i (but larger scale) > and I need it in a single column going a to z. You up for using a macro? Sub ToOneColumn() 'dantuck Mar 7, 2007 &...

update column
How would I update a column with numeric values so that there are 3 leading zeros for each row? hi it is not possible to add leading zeros to a numeric value. Mathematically, this is redundent and unnecessary. "brian" wrote: > How would I update a column with numeric values so that there are 3 leading > zeros for each row? opps. hit the post button too quick. option 1. custom format if your numeric value is 12345 then see the custom format to 00000000. note. format do not change data - it just changes the way it looks in the cell. option2. format to text then use the c...

visual basic
Hi, I trying to retrieve values from a table to calculate the 14days average value of a stock closing price. However, i encounter some problem as stated beside the code as follows: Function DaysAvgs() 'Calculate the average value of a given value. Dim db As DAO.Database Dim rst As DAO.Recordset Dim varBookmark As Variant Dim numAve, numDaysAvg As Double Dim intA, intB, lngCount As Integer Set db = CurrentDb 'Open Table Set rst = db.OpenRecordset("SGX Individual Historical", dbOpenTable) rst.MoveFirst Do While Not rst.EOF intA = 1 intB = 0 varBookmark = rst.Bookmark n...

Joining text with a formula in cell #4
just to complete the thread... I found the answer. You have to change the format of the cell to custom 0.00"*" this is the only way it will show only 2 decimal places Thanks for the hel -- Mustard Hea ----------------------------------------------------------------------- Mustard Head's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1630 View this thread: http://www.excelforum.com/showthread.php?threadid=27700 ...

Global Column Row Preview Font Size
I know I can change the column, row and preview font size for the current email folder's view, but how do I do it for all of the email folders? I have loads of email addresses each with lots of folders. I don't want to have to do each one at a time. Surely there must be a default font setting (even if it's only in the registry)? Thanks in advance, Tim. I too would love an answer to this. Ian "Timie Milie" <tim_milstead@yahoo.co.uk> wrote in message news:45782ee8$0$27107$db0fefd9@news.zen.co.uk... >I know I can change the column, row and preview font ...

IsOutLookClient() returns wrong value
IsOutLookClient() returns wrong value when both web client of crm and outlook client are running on the same workstation It looks like the same cookie(used for determining what client is running) is used by the sessions of each client. Look for "LightClient" in IsOutlookWorkstationClient() in global.js Oeps...I seem to have made a wrong assumption... Between the to clients IsOutlookClient() seems to work ok... But in outlook client the IsOutlookClient() function gives false for me...after I have opened a page from the Microsoft Crm folder structure... On another workstation it...

changing values of one field based on another
How can I best change the values of one field in a table based on values of another field of the same table. We have an existing table of thousands of entries and I would like to use the following logic to populate a new boolean field. If field1 = "Done" Then BooleanFieldCompleted = True I have some Excel VBA experience but limited Access. I dont want to do this manually! Any assistance appreciated. In general, you'd use an Update query. However, in this case I don't see why you'd need such a field. Why not just create a query with a computed field that returns True...

Single click selects multiple cells
When clicking on a single cell multiple cells are selected. The one time solution for this is to zoom in or out. This is problematic as 60% seems to be the zoom that works most of the time but at this zoom level the cell contents do not display. The time lost and the frustration that builds is killing my productivity and office attitude. Please give all of us a permanet fix. -- Thanks Mike ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" butt...

Page setup for 8.5x11 calendar w/picture on tabloid paper?
How can I set up a calendar with 8.5x11 (landscape) pages with pictures for each month to print on tabloid (11x17) paper so it can be saddle stiched? I would like the picture on the top half and calendar on the bottom half. I keep ending up with two of the same pictures on one page and two calendars on the next page. Thanks, Bob I assume you are taking this to a professional printer so why not just set each page up as a landscape 8� x 11 and let your printer do the rest? -- JoAnn Paules MVP Microsoft [Publisher] "Bob at 4799" <Bob at 4799@discussions.microsoft.com>...

I would like to know how to set up a 'fill in the blanks' form?
I would like to set up a templet of sorts to fill in the blanks for certificates. ...

Referencing cells across sheets
Hi, I've created a workbook with three sheets. The first three columns of sheet 2 and sheet 3 are referenced to the first three columns of sheet 1. What I'd like to do, is set the workbook up so that if I insert a row before, between or after referenced rows in sheet one, a row will also be inserted, and referenced, in the corresponding place on sheets 2 and 3. Does anyone know how to do this? Also, if no data is entered into a cell on sheet one, the value shown in the corresponding cells of sheets '2' and '3' is '0'. I need those cells to remain bla...

Copying Data in a cell in one sheet to a cell in another sheet
I've run into a problem trying to copy data from a cell in one sheet to another. I have a spreadsheet called "rating" which contains a number of formula that calculates a final number. I also have a spreadsheet called "Final" that copies over the information from "Rating". In "Final", I'm trying to copy a number from "Rating" into a particular cell. I put in =Rating! G89, but it won't work. When I press enter, a window pops up "Update value:Rating". I press enter again and in the cell where I want the number ...

How to unlock locked cells by MACRO?!
I have locked Sheet and I need to change particular cells. But when my macro wants to change it => ERROR :/ Is there any way to unprotect these particulary cells by macro and change them? - after that action, of course, I want to lock them again. Please help me, Pedro Just unprotect the sheet, do the work, and reprotect the sheet. Kind of like: activesheet.unprotect password:="yourpassword" 'your code to change stuff activesheet.protect password:="yourpassword" Petr N�me�ek wrote: > > I have locked Sheet and I need to change particular cells. But when m...

How to add a button to restore all altered cells original values?
I want to add a reset button to an excel spreadsheet that will restore the values of all changed cells to the original saved ones. Any help would be appreciated. Thanks Dawn Hi this would require quite some VBA code as you somehow have to store the original values for example on a separate hidden sheet -- Regards Frank Kabel Frankfurt, Germany "Dawnybros" <Dawnybros@discussions.microsoft.com> schrieb im Newsbeitrag news:3340601E-16EE-4296-8F50-B0BAC18EA387@microsoft.com... > I want to add a reset button to an excel spreadsheet that will restore the > values of all ...

How do I insert space between 2 consecutive columns of an XL Shee.
I want to have space between two consecutive columns of a worksheet (of course, without having inserted another column between the two) in order to have separated the Border Lines of the adjacent cells/columns. Please guide me if it can be done in XL. Can you achieve the effect that you're looking for by using a double vertical border down the right side of the left column and having no border down the left side of the right column? Rgds, ScottO "Shamshad Butt" <Shamshad Butt@discussions.microsoft.com> wrote in message news:1222EE13-11A9-4354-9F12-D1F1155D3902@microsof...

Visual C++ 2005 always rebuilds
I have an MFC DLL project that I recently moved over to Visual Studio 2005. However now the project always rebuilds entirely whenever I start debugging. Even if I have only made a simple change to one file. Any help would be greatly appreciated. Thanks Colin Check the date on your source files to make sure that they are not in the future. AliR. "Colin J Paterson" <nospam@thanks.com> wrote in message news:ObtLxgTbGHA.1196@TK2MSFTNGP03.phx.gbl... > I have an MFC DLL project that I recently moved over to Visual Studio 2005. > However now the project always rebuild...

Can i use conditional formating on a cell when it contains a formula?
I am trying a "conditional formatting" on a cell that contains formula, but it didn't work. "If cell value is equal to 0 then font - white" This doesn't work, stays always. If i use this condition on a cell without formula it works just fine. Thank -- si ----------------------------------------------------------------------- sit's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=262 View this thread: http://www.excelforum.com/showthread.php?threadid=26784 Hi are you sure your formula returns an exact zero?. Could you post the formul...

How do I convert a concatenated value into a know value
Hi all I am trying to get the results of a multiple input table, which get concatenated, read out as usable values eg. If the concatenated values are for example *llbbt* , I need this t be read as Simon, or *lbttd* must result in Fred etc... I will attact the spreadsheet. Thanks Colli Attachment filename: book3.xls Download attachment: http://www.excelforum.com/attachment.php?postid=54116 -- Message posted from http://www.ExcelForum.com You are probably better off by describing your problem, most regulars won't open files.. -- Regards, Peo Sjoblo...

Value is BLANK
In a form i'm working on i've asked this question before and i'm unable to locate the replies, but in one cell I have a date to be enter and in the other cell it takes that date and add 5 days to the date to give me a due date. But if no date is enter then I want to to remain blank insted giving me a date. Say that the date is to be entered into A1, then enter this formula into the "other" cell: =IF(A1,A1+5,"") -- HTH, RD ============================================== Please keep all correspondence within the Group, so all may benefit! ==================...

Cell with large amount of data not showing all data
I'm running Excel 97. I have a cell with 358 words (1928 characters with spaces). Word wrap is on for the cell. Only part of the text is displayed even though the cell is big enough to show everything. If I make the cell wider (wider than a page) more of the text shows but not everything. I tried a new worksheet with the same text and had the same problem. Is this a known issue with excel? Is there a solution? Thanks, Brad Left to its own devices, excel will only show about 1000 characters in a cell. But you can add some alt-enters (to force a new line within the cell) and see more s...

Adding blank "separator" Rows in a Pivot Table
Does anyone know how to insert blank rows into a pivot table (say, between groupings, etc.)? There has to be a way, since some of the various table formats that come with Excel include blank rows. Double-click the field button that you want to format Click Layout Add a checkmark to Insert blank line after each item Click OK, twice Bucko wrote: > Does anyone know how to insert blank rows into a pivot table (say, > between groupings, etc.)? There has to be a way, since some of the > various table formats that come with Excel include blank rows. -- Debra Dalgleish Contextures http...

Null value in form not trapped by beforeupdate event
I have a form in Access 2003 linked to a SQL Server 2005 table. When I clear the value in a textbox (bound field is varchar and is required), I want the before update event to run to tell the user the value cannot be null. When I press the tab button to move to the next field after clearing the texbox, the before update event is not triggering and instead I'm getting the following error: You tried to assign the Null value to a variable that is not a Variant data type. (Error 3162) How can I prevent nulls before and this error from triggering? Thanks! ...

Determine a result of one column based on conditions in two column
Example Col A Col B Count the number of a's in Col B only when an x is in Col A x a x a Result should be 2 y a z p I can't figure it out x t x m Thanks try this =SUMPRODUCT(--(A2:A7="x"),--(B2:B7="a")) -- Hope this help Please click the Yes button below if this post have helped answer your needs Thank You cheers, francis "tel703" wrote: > Example > Col A Col B Count the number of a...