VBA Copy and Paste into certain location with restrictions

hawkeyemc

New Member
Joined
Apr 1, 2013
Messages
1
Hello all,

I am trying to create a passenger manifest form. I have sheets for each day. I Have a userform that outputs to sheet called "Master", need to copy Cells D2:N2 from sheet "Master" and paste into a specific location on a specific day based on user entry. I would like to prompt the user to ask for the day and type of Aircraft (i.e. 15-Mar / Transport 1, Transport 2, Helicopter 1, Helicopter 2, etc... and copy from "Master" and paste to a different location on the dated sheet(i.e. sheet "15-mar) based on what the user entered. The restriction being, Transport one is D2:D23 (22 seats available); (show error box if more than 22 passengers reached) Transport two is D29:D50 the entries need to be pasted below each previous entry so not to overwrite.

So summarization user enters passenger information on a form. Clicks save data, the prompt asks what day the passenger is traveling, and via what means. The form copys the data to "master" (not needed to save data only to copy and paste to its intended location) The data is then copied to a dated sheet in specific row locations based on means of travel. Need each entry to populate a different row i.e Row 1, next entry populates Row2, Row 3, etc. Once 22 rows have been filled, error box saying all seats are filled.
Any help is greatly appreciated.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,215,842
Messages
6,127,235
Members
449,372
Latest member
charlottedv

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