Dear Gents,
I have a table that stores some items like the following.
ID Mask ID Company 1 1A 2 2A 3 1B 4 3A
i Need a formula that returns the last maskID which ends with "B" , How should be done ?
Thanks
Dear Gents,
I have a table that stores some items like the following.
ID Mask ID Company 1 1A 2 2A 3 1B 4 3A
i Need a formula that returns the last maskID which ends with "B" , How should be done ?
Thanks
Use DMax() ?
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
Suspect your example data is too simplistic. Last has no meaning without an order so need to know last in terms of what? Per your example that would in terms of ID and would return the record where ID=3.
And since your mask ID is a number followed by a letter, sorting will be a string sort so if you have
5B
22B
333B
5B will be last
Actually after 5B we should add 6B and 7B etc , But between them the other maskID which ends with ASuspect your example data is too simplistic. Last has no meaning without an order so need to know last in terms of what? Per your example that would in terms of ID and would return the record where ID=3.
And since your mask ID is a number followed by a letter, sorting will be a string sort so if you have
5B
22B
333B
5B will be last
OK so you will never go over 9B?
if you did, you are OK for adding ....4B, 5B, 6B, 7B, 8B,9B but if you add 10B, 9B will still be last
Or are you saying if your data looked like this, you still want 1B returned
ID Mask ID Company 1 1A 2 3B 3 1B 4 3A
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
Please have a look at Query1 in attached file.
Cheers,
PERFECT , That's what I want , Thanks.
You're very welcome, good luck with your project!
Cheers,