VBA - Matching specific date horizontally and insert value

minhlac

New Member
Joined
Jul 25, 2018
Messages
6
Hi all,

I found this forum very helpful so I sign up and this is my first post in this forum. :)

Please help! I have data as below, date from column D will keep going to the right (as a diary record).


ABCDEFGHIJ
1ItemQuantityDelivery date04/0805/0806/0807/0808/0809/0810/08
2red207/082
3blue
4yellow
5pink509/085

<tbody>
</tbody>




I would like to have a solution with Excel VBA carry out two tasks

1. For the example above, for item "red" when input delivery date and quantity then it will scan through row 2 for a matching date and leave the quantity at the intersecting cell of the same row looking up to that date column. Therefore we have the result 2 in cell "G2". In general, VBA will look up value (date format) in column C to match value (also date format) of any column from D onward, find the intersecting cell of the value current row and matched date column, then pick up value in column B (same row) and to insert in intersecting cell.

2. The intersecting cell value will stay as "text" only without formula format since column B and C will be dynamic changes based on user input.

I hope that would make sense.
Thank you in advance for your time.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,214,940
Messages
6,122,356
Members
449,080
Latest member
Armadillos

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