Excel VBA–Accelerate hydrologic analysis

NWRA webinar, February 28, 2024


  • 00_EfH-VBAnotes.pptx – Powerpoint that describes macros and approaches
  • 01_ReadFromPAGE.xlsm – Workbook with example data and macros
  • 02_Data-in-Another-Workbook.xlsx – Workbook with external data

UNZIP MATERIAL & PLACE IN TRUSTED LOCATION


Complex or repetitive hydrologic analyses can exceed the capacity of intrinsic functions in Excel. Complex analyses typically require nested loops and multiple if-statements, such as finding the closest well to a location. This can be determined with intrinsic functions, but is cumbersome and unworkable with many wells. Comparing measured values to simulated results from numerical models requires importing data from text files. Copying and pasting data sets into an Excel template will work, but this repetitive process grows tiresome and error prone after a few iterations.

Complex and repetitive problems can be addressed with Excel VBA. Addressing these problems with Excel VBA will be introduced in a 1-hour webinar. Extracting data from worksheets and text files and writing arrays to worksheets will be covered. Significance of RANGEs as Excel VBA objects and utility of variants for handling arrays will be explained. This webinar assumes you have programming experience and can manipulate your data after importing variables into a macro. An outline, slides, and class material will be available prior to the introductory Excel VBA webinar. Interest for subsequent webinars or classes will be gaged by responses to this introductory webinar.