Hi Rick, it all worked except the formatting of two my my cells was changed when pasted onto the Notepad file. The cells have dates in the format of yyyymmdd in Excel, but in Notepad they changed to m/d/yyyy. Any idea why?
Yes, because my code takes the underlying value from the cells, not what is displayed in them (meaning formats are ignored). Will those two date cells always be the same cells? If so, what are their addresses (I see if I can correct the data while it is being compiled). If I can't, I'll have to rewrite the code.
The two cells will always be the same, or I should say, the two columns will always be the same (the columns are for dates). The cells would be T2 and X2. Basically column T and X, starting with row 2.
Rick Rothstein,
I thank you for the simple and elegant solution I had been looking for all week. I'm not a coder, so trying to get some of the other solutions to work was turning into wasted time. I am more impressed with the brevity and conciseness you used addressed the issue than all the other blah blah blah pieces of endless code that I had been working with.
My hat is off to you sir!
Rod
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.