Solved

Excel Formula - VLOOKUP with Count

Posted on 2013-12-06
2
1,146 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Outlook Free & Paid Tools
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now