Excel Formula - VLOOKUP with Count
Posted on 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.