Ok, I recieve three excel sheets via Outlook everyday. The excel sheets are automatically created by querying a database. It's my job to take this excel sheet a put it in the correct format before sending it out to everyone else. Don't ask me why it isn't pulled in the correct format to begin with, I cry myself to sleep every night just thinking about it.
To do this as quickly as possible I created a VB script. This script copied the original sheet across multiple sheets and removes rows from each depending on what's in that specific row. I've completely automated everything with the exception of one tab. On this tab, I need to remove a row with a date not equal to cell J4 in column G. The problem here is, when the data is queried from the DB the dates are placed in this column in a General format, not date. The date that is in J4 changed everyday, so the formula for this cell is TODAY(). I can't just change the format of column G to Date format, because excel still doesn't see Column G and J4 as equal to each other. Any ideas on how I can convert Column G to the correct format to compare to cell J4? Maybe Vice-Versa?
To do this as quickly as possible I created a VB script. This script copied the original sheet across multiple sheets and removes rows from each depending on what's in that specific row. I've completely automated everything with the exception of one tab. On this tab, I need to remove a row with a date not equal to cell J4 in column G. The problem here is, when the data is queried from the DB the dates are placed in this column in a General format, not date. The date that is in J4 changed everyday, so the formula for this cell is TODAY(). I can't just change the format of column G to Date format, because excel still doesn't see Column G and J4 as equal to each other. Any ideas on how I can convert Column G to the correct format to compare to cell J4? Maybe Vice-Versa?