stacey52891
New Member
- Joined
- Sep 9, 2013
- Messages
- 12
I need help writing VBA Code that will work for a spreadsheet I am working on. I have tried the record macro process but I cannot get a date column I am working with the format correctly. This data is coming from a program and needs to be scrubbed so formulas can be written for it.
In column A: I have statuses. I need any lines of data that have a status of "DENI" or "PEND".
In column B: I need these cells to be formatted to: MM/DD/YYYY
I need this to be done on multiple sheets, could you show me how this could be nested together so that these actions are done on "Sheet1", "Sheet2", and "Sheet3". However, this does not need to be done to ALL sheets. Thank you so much for your help with this.
[TABLE="width: 384"]
<tbody>[TR]
[TD]App Status[/TD]
[TD]last_update_time[/TD]
[/TR]
[TR]
[TD]COMPL[/TD]
[TD]2017-Jan-04 10:03:14[/TD]
[/TR]
[TR]
[TD]COMPL[/TD]
[TD]2017-Jan-05 16:49:47[/TD]
[/TR]
[TR]
[TD]COMPLETED[/TD]
[TD]2017-Jan-04 16:59:50[/TD]
[/TR]
[TR]
[TD]COMPLETED[/TD]
[TD]2017-Jan-05 12:28:00[/TD]
[/TR]
[TR]
[TD]DENI[/TD]
[TD]2017-Jan-05 00:15:16[/TD]
[/TR]
[TR]
[TD]DENI[/TD]
[TD]2017-Jan-05 00:15:16[/TD]
[/TR]
[TR]
[TD]N/A[/TD]
[TD]2017-Jan-04 10:47:45[/TD]
[/TR]
[TR]
[TD]N/A[/TD]
[TD]2017-Jan-05 16:08:31[/TD]
[/TR]
[TR]
[TD]PEND[/TD]
[TD]2017-Jan-05 16:49:47[/TD]
[/TR]
[TR]
[TD]PEND[/TD]
[TD]2017-Jan-04 10:03:14[/TD]
[/TR]
[TR]
[TD]START[/TD]
[TD]2017-Jan-05 16:08:31[/TD]
[/TR]
[TR]
[TD]START[/TD]
[TD]2017-Jan-04 10:47:45[/TD]
[/TR]
[TR]
[TD]STARTED[/TD]
[TD]2017-Jan-05 12:28:00[/TD]
[/TR]
[TR]
[TD]STARTED[/TD]
[TD]2017-Jan-04 16:59:50[/TD]
[/TR]
</tbody><colgroup><col><col></colgroup>[/TABLE]
[TABLE="width: 384"]
<tbody>[TR]
[TD][/TD]
[/TR]
</tbody><colgroup><col><col></colgroup>[/TABLE]
In column A: I have statuses. I need any lines of data that have a status of "DENI" or "PEND".
In column B: I need these cells to be formatted to: MM/DD/YYYY
I need this to be done on multiple sheets, could you show me how this could be nested together so that these actions are done on "Sheet1", "Sheet2", and "Sheet3". However, this does not need to be done to ALL sheets. Thank you so much for your help with this.
[TABLE="width: 384"]
<tbody>[TR]
[TD]App Status[/TD]
[TD]last_update_time[/TD]
[/TR]
[TR]
[TD]COMPL[/TD]
[TD]2017-Jan-04 10:03:14[/TD]
[/TR]
[TR]
[TD]COMPL[/TD]
[TD]2017-Jan-05 16:49:47[/TD]
[/TR]
[TR]
[TD]COMPLETED[/TD]
[TD]2017-Jan-04 16:59:50[/TD]
[/TR]
[TR]
[TD]COMPLETED[/TD]
[TD]2017-Jan-05 12:28:00[/TD]
[/TR]
[TR]
[TD]DENI[/TD]
[TD]2017-Jan-05 00:15:16[/TD]
[/TR]
[TR]
[TD]DENI[/TD]
[TD]2017-Jan-05 00:15:16[/TD]
[/TR]
[TR]
[TD]N/A[/TD]
[TD]2017-Jan-04 10:47:45[/TD]
[/TR]
[TR]
[TD]N/A[/TD]
[TD]2017-Jan-05 16:08:31[/TD]
[/TR]
[TR]
[TD]PEND[/TD]
[TD]2017-Jan-05 16:49:47[/TD]
[/TR]
[TR]
[TD]PEND[/TD]
[TD]2017-Jan-04 10:03:14[/TD]
[/TR]
[TR]
[TD]START[/TD]
[TD]2017-Jan-05 16:08:31[/TD]
[/TR]
[TR]
[TD]START[/TD]
[TD]2017-Jan-04 10:47:45[/TD]
[/TR]
[TR]
[TD]STARTED[/TD]
[TD]2017-Jan-05 12:28:00[/TD]
[/TR]
[TR]
[TD]STARTED[/TD]
[TD]2017-Jan-04 16:59:50[/TD]
[/TR]
</tbody><colgroup><col><col></colgroup>[/TABLE]
[TABLE="width: 384"]
<tbody>[TR]
[TD][/TD]
[/TR]
</tbody><colgroup><col><col></colgroup>[/TABLE]