Capturing data in rows for number of days selected in calender

dss28

Board Regular
Joined
Sep 3, 2020
Messages
165
Office Version
  1. 2007
Platform
  1. Windows
I want to build a data base using a userform1 having say 4 textboxes to input data
textbox1 - Name
textbox2 - address
textbox3 - Start date
textbox4 - end date

the sheet1 where data will be saved will have columnsA as Name, ColumnB as Address, ColumnC as Date.

I want to capture data in sheet1 in such a way that if start date and end date is same, Name, Address and date is captured only once.

If the duration between start date and end date is 3 days (eg. 20/10/2021 to 22/10/2021), then Name, address and date (3 different dates - 20/10/2021, 21/10/2021, 22/10/2021) are captured in the sheet in three rows.


Book1
ABC
1Name AddressDate
2Mr AXYZ01-01-2021
3Mr AXYZ02-01-2021
4Mr AXYZ03-01-2021
5Mr AXYZ04-01-2021
6Mr BABC01-01-2021
7Mr CDEF02-03-2021
8Mr DDEF10-03-2021
9Mr DDEF11-03-2021
10Mr DDEF12-03-2021
11Mr DDEF13-03-2021
Sheet1
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

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