VBA - Copy Paste using index match to determine paste location

thekingswolf

New Member
Joined
May 28, 2019
Messages
6
All tabs on same .xls file.

Tab CurrentCases has named table with active cases, client name, contact info, follow up date, ect.
Tab Outbound is working space, cell K3 references another cell so it contains the next business day.

I have a drop down box on Outbound with data validation to CurrentCases with all my active customer names. I click the customer name, and my sheet populates with all the correct info.

I want to click a button on the Outbound tab and have it copy the date in K3, then replace the current date for the active customer on the CurrentCases tab.

I can't figure out how to set the paste location using index match. I already have the formula, i just can't get it to work in VBA. This is the formula that works to determine the paste location.

=INDEX(CurCases[[Name]:[Follow Up]],MATCH(J1,CurCases[Name],0),8)
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Worksheets("Outbound").Range("K3").Copy
Worksheets("Outbound").Range("INDEX(CurCases[[Name]:[Follow Up]],MATCH(J1,CurCases[Name],0),8)").PasteSpecial Paste:=xlPasteValues

this is what I want but obviously the syntax is wrong
 
Upvote 0
Correction:

Sub SetDate()


Worksheets("Outbound").Range("K3").Copy
Worksheets("CurrentCases").Range("INDEX(CurCases[[Name]:[Follow Up]],MATCH(J1,CurCases[Name],0),8)").PasteSpecial Paste:=xlPasteValues


End Sub


Wish I could edit my post instead of adding replies
 
Upvote 0
Please explain in words what your wanting to do.

See your showing us how you want it done.

Just tell me what you want to accomplish and I will write you the script.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,619
Latest member
Shiv1198

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