Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
VLOOKUP Replacement for Access
Rick R 
      
15 years ago
John P. asks:

Is there a solution for DLookup as in the lookup table not the exact match is found?

1. Find the first next record (in the lookup table)

or

2. Find the first previous record (in the lookup table).



So you're saying you need to do something like the student gradebook example that I cover in my Excel classes with VLOOKUP? It goes something like this:

You've got a lookup table like:

NumberGrade, LetterGrade
0, F
65, D
70, C
80, B
90, A

You need to lookup the grade 87, which should return a "B" but it's not exactly in the table? For this, use DMAX or DMIN followed by a DLOOKUP. You can say:

X = DMAX("NumberGrade","LookupT","NumberGrade <= " & SomeValue)

Translated, this says "look up the largest value in my table that is LESS THAN OR EQUAL TO the grade I'm looking for." So if you send it an 87, it should find 80.

Now that you have this value, it's just a simple DLOOKUP to get the letter grade:

L = DLOOKUP("LetterGrade","LookupT","NumberGrade = " & X)

Easy enough?

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/20/2026 3:58:55 AM. PLT: 1s