Solved

Excel Formula - VLOOKUP with Count

Posted on 2013-12-06
2
1,208 Views
Last Modified: 2013-12-06
I have the following formula in a cell, which will display either 'Y' or 'N' (possibly '')

=IF(OR($H288 = "", $H288 = "Monthly Totals:"), "", IF(ISERROR(VLOOKUP($H288,DecemberPayees,1,FALSE)), "N","Y"))

I use it as part of my 'check ledger' to make sure I've accounted for a recurring payee. If I've created an entry in the range 'DecemberPayees' (which changes monthly), a 'Y' will be displayed. In some cases, I make bi-weekly payments, which means that I really don't want to display 'Y' unless there are at least 2 (yes, I know there can sometimes be 3 pay periods in a month, if you figure out how to determine that and adjust the formula accordingly, I'll figure out some way to give you extra points).

Basically, for biweekly payments, the VLOOKUP needs to find 2 occurrences of the payment in the named range.
0
Comment
Question by:dbbishop
2 Comments
 
LVL 35

Accepted Solution

by:
mvidas earned 500 total points
ID: 39701737
Hi dbb,

Since you're not using the return value of vlookup, why not use COUNTIF instead?

=IF(OR($H288 = "", $H288 = "Monthly Totals:"), "", IF(COUNTIF(DecemberPayees,$H288)=1, "N","Y"))

Change the =2 to test for 2, etc. If you want to see if its there at least one, then do >0 instead of =1.

Matt
0
 
LVL 15

Author Closing Comment

by:dbbishop
ID: 39701789
Is there an A+ ? Thanks.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question