Stuck using Index match with VBA...

cillyRabbit

New Member
Joined
May 19, 2021
Messages
7
Office Version
  1. 2019
Platform
  1. Windows
Hello everyone,
Programming was a trait I stopped polishing 10+ years ago. VBA is entirely new to me.
We needed to put together a CMMS system and I couldn't find one out there that I really liked so I set out to build my own. I do enjoy the struggles but I have reached the point where I need some help.
CMMS is just tracking maintenance. So I have a table that has the following columns (MaintenanceID, Date, AssetID, AssetName, AssetHours (Heavy equipment), Maintenance Type, etc.)
I am able to use Application.WorksheetFunction.MaxIfs to determine the date that the last maintenance that was done for an asset.
I am able to generate the assetID.
However with the assetID and the last date of service held in separate variables, I can not for the life of me figure out how to pull the "AssetHours" from the last service.
I have tried Index..Match but I am at a loss and keep running in syntax circles.
Would anyone be interested in looking at the project?
Thank you,
-Kevin

What I have so far is pretty neat, at a glance our mechanic will be able to see in a color coded fashion what assets need service, and how much life (as a percentage) is left before they need service.
 
Unfortunately I could not get the provided to work.
However, Your idea of assigning it to a cell may just be a good enough workaround.
I will keep you posted and thank you very much for your assistance.
Thank you,
-Kevin
 
Upvote 0

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Kevin
Also try using Evaluate
VBA Code:
            PM_units = Evaluate("=INDEX('Maintenance-Records'!E13:E10000,MATCH(1,(V3='Maintenance-Records'!G13:G10000)*(V4='Maintenance-Records'!F13:F10000),0))")
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,497
Members
448,967
Latest member
visheshkotha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top