Copy/Paste Range to another Range when a Date matchs a Row

dpancer

New Member
Joined
Jun 16, 2015
Messages
6
I have been searching and trying to put some VBA code together to do what I want but im still lost.

I have the days of the month listed in cells A3:A30 in date format. I will be manually entering a date into E37. On a button push the code should search (A2:A30) to find the corresponding row which has the matched date in E37. It should then copy the values in (I38:I40) and (L38:L40) to this row in the following columns:

COPY CELLSPASTE COLUMNS
I38 toI(Row#)
I39 toK(Row#)
I40 toM(Row#)
L38 toAD(Row#)
L39 toAF(Row#)
L40 toAH(Row#)

<tbody>
</tbody>


so basically, the manually entered date is just to allocate the row number to the paste function.

Notes:
-If there are any existing values is the listed paste-to columns they should not be over written. Instead they should just be highlighted red.

- if any values in (I38:I40) and (L38:L40) are LEFT blank nothing should be pasted to the paste columns and nothing is to be highlighted red. What I mean is that if there already is a value in say, AD16, and L38 is left blank, AD16 should not become blank as well and does not need to be highlighted.

I really hope you guys can help me out.

Thanks


check out the attached image to get a better idea of the spreadsheet im working with.


Capture_zpssgq3sa0f.jpg
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Bump.

Any one have any solutions for this? Still cant find and piece together the code for this
 
Upvote 0
Im not going to write your project for you but I could give pointers. Thats probably why you havent had replies. Firstly are those dates in column A real dates or text?
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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