Copying multiple columns based on header name dynamically through input box

vinmam123VBA

New Member
Joined
Dec 18, 2020
Messages
33
Office Version
  1. 365
Platform
  1. Windows
Hi All,

Can any one please help on below requirements:

I have source data where I have two sections(One Actual time other Input time).Please refer the below screenshot.

1608850015598.png


Would like to copy multiple months column data from "Actual time" and "Input time" and paste in destination sheet in column "P" and "R" respectively

Some time I need to copy and paste for few months(Example three months and some time four months and some time two months)

Can I input months name in input box and then do copy paste.

For example if I want to copy for months Oct'20,Nov'20 and Dec'20 (from both Actual time and Input time from source data-Above screenshot for your kind reference) and paste the data in column "P" and column "R" in the destination file.

Regards,
Vin
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi,

could you give an example input and output?
I don't understand, what your're trying to do.
Thanks
 
Upvote 0
Hi

Thank you for the response!

Please find below screenshot:

1608958682122.png

Would like to copy actual time and Input time (Any number of months dynamically) from Source data and paste in Destination file column P(Actual time) and column R(Input time) and Column A(Month in format of Jan'20)




Regards,
Vin
 
Upvote 0
Hi Vin,
Happy New Year!

I've created a Workbook with some sample data that does what you wanted.
But there are a few limitations:
  • it only copies those rows where data is found in the first column (A), starting with Cell A4 until first blank Cell in Column A in the Source Data Worksheet
  • right now the copy process deletes all data from Destination Data Worksheet and pastes the new data in the Destination Data Worksheet
You may want a different behavior, but for this to work I need a little more information on your data, which you may provide in an answer.

Until then, here's the Excel file:
MrExcel_vinmam123VBA_datacopy.xlsm

You need to download it to your computer and enable macros in order to use it.

Regards
Pete
 
Upvote 0

Forum statistics

Threads
1,214,545
Messages
6,120,132
Members
448,947
Latest member
test111

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