Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-19-2017, 06:40 AM
mtstringer mtstringer is offline Macro to add new date entries to existing records in database Windows 8 Macro to add new date entries to existing records in database Office 2013
Novice
Macro to add new date entries to existing records in database
 
Join Date: Dec 2017
Posts: 2
mtstringer is on a distinguished road
Default Macro to add new date entries to existing records in database


Hello,

Would someone please help me design a relatively simple macro? I have a database of approximately 30,000 employees, listed by badge #. Some of the employees are occasionally run through assessments, which then requires my team to add the new assessment dates to their records. The fields to track the assessment dates are already in place.

See sample worksheet (attached), which gives the basic idea for the functionality I’d like.

The macro would:

1. Read the badge # and the Assessment Type from the “Dates to add” table
2. Find the matching Badge # in the database and paste the new Assessment Date into the correct column

…unless you have a better idea to update the database! I'm all ears.

Help greatly appreciated!
Attached Files
File Type: xlsx Database example.xlsx (11.6 KB, 11 views)
Reply With Quote
  #2  
Old 12-21-2017, 01:40 AM
ArviLaanemets ArviLaanemets is offline Macro to add new date entries to existing records in database Windows 8 Macro to add new date entries to existing records in database Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

Here you go!

No need for VBA - worksheet functions will do nicely!

NB! One formula is an array formula (Cntrl+Shif+Enter to enter the formula when editing).
Attached Files
File Type: xlsx Assessments.xlsx (14.8 KB, 7 views)
Reply With Quote
  #3  
Old 12-21-2017, 08:25 AM
ArviLaanemets ArviLaanemets is offline Macro to add new date entries to existing records in database Windows 8 Macro to add new date entries to existing records in database Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

In this version, Badge's for report are queried from Assessment sheet, and the report table is expanding/shrinking automatically. The query uses a fixed named range as source, and is created from menu Data > From other Sources > From Microsoft Query with Excel Files* as data source.

To eliminate the need of editing the query, I added an Open event, which adjusts query automatically, whenever workbook is moved or renamed. Having an Open event in workbook was the reason for change of workbook format to xlsm. To get the query to work, the workbook must be saved somewhere.

The query is refreshed automatically whenever the workbook is opened. During session you have to refresh it manually, when the need arises.
Attached Files
File Type: xlsm Assessments.xlsm (25.2 KB, 11 views)
Reply With Quote
  #4  
Old 12-27-2017, 03:46 AM
mtstringer mtstringer is offline Macro to add new date entries to existing records in database Windows 8 Macro to add new date entries to existing records in database Office 2013
Novice
Macro to add new date entries to existing records in database
 
Join Date: Dec 2017
Posts: 2
mtstringer is on a distinguished road
Default

Wow, interesting solutions! Thank you both so much! I'll play with both of these to see which suits best going forward. I appreciate your time and effort! Happy 2018
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to add new date entries to existing records in database When using a 'Master' template, if number of records change, subsequent records will not be read MailMergeConfused Mail Merge 5 07-28-2016 05:07 PM
Macro to add new date entries to existing records in database Macro to make all entries look like first entry msdelaney Word 1 07-27-2015 07:13 PM
Macro to add new date entries to existing records in database edit date in footer of existing slides eNGiNe PowerPoint 6 05-27-2015 05:39 AM
Formula for decimal hours from two date time entries DBenz Excel Programming 0 01-15-2015 05:52 AM
How Can I Flag Duplicate Date Entries? tatihulot Excel 5 11-16-2012 12:19 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:58 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft