VBA Macro for text dates

chintanpatel

New Member
Joined
Apr 15, 2022
Messages
2
Office Version
  1. 2011
Platform
  1. Windows
Hi ,

I need to copy and paste data based on certain conditions are met in tab 2 data. The conditions are will be in tab 1.

I have managed to get data spilt into diffrent tabs.

The most challeging part for me is date section in tab 2 column 3, is in dd/mm/yyyy HH:mm:ss, one of the condition I need to meet is if user enters the date say 10/04/2022 as a start date and end date is 11/04/2022 and I need to copy data from tab 2 from 10/04/2022 12:00:00 midday to 11/04/2022 midday only.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi bebo021999,

Thank you very much for this. I should have explained this better in first place. Apologies for this.

I have dates in text format and what I am trying to achieve is once use enters the selection here and it should pick up data based on this

this is user input field in Tab 1, essentially they will be typing something like Start date 01/02/2022 12:00:00
End date 02/02/2022 12:00:00

1650610456901.png

this is user input field in Tab 1, essentially they will be typing something like Start date 01/02/2022 12:00:00
End date 02/02/2022 12:00:00 and based on this it should pick up the data from tab2 below and throw it into respective tab.

1650610365074.png
this is the raw data


Thank you
kind regards,
Chintan
 
Upvote 0

Forum statistics

Threads
1,213,565
Messages
6,114,338
Members
448,570
Latest member
rik81h

We've detected that you are using an adblocker.

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.
Go back
Back
Top