Hi all,
I was just seeking some advice on how to write a macro that will insert a formula only if a condition is met.
The goal here is I have a column of dates and want to run an xlookup formula to pull in data only if the date is within the past 30 days.
I want to macro to look for example at the date in A1, and if that date is less than 30 days before todays date, then run an xlookup and write the value to B1.
I am hoping to set this up to look through up to 1000cells (A1 to A1001). Below is the code I attempted to write but does not work seem to work at all as I am quite new to this.
-----
----
Any suggestions on how to do this would be greatly appreciated.
Bookmarks