Copy the value of a cell onto another worksheet based on the dropdown selection

denissimo

New Member
Joined
Apr 24, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hi folks,

Very new to VBA, was looking for a similar cases all over the place, but the solutions are unique to the issues and would require some changes that I'm not sure how to perform, so asking in a new thread and hopefully someone could help me out here please🤞

I'd need a code for the following task:

1) cells B20 to B30 in column B of the table in "Exit strategy" sheet contain predefined exit triggers.

2) Cells in column C of the same table in "Exit strategy" sheet contain dropdown with list of exit strategies, one of them is "Do nothing".

3) In cells C20:C30 User would choose exit strategies corresponding to each trigger in column B. If user selects "Do nothing" as an exit strategy, for example in cell C25, I want contents of cell B25 (exit trigger) copied over and pasted to an existing sheet within the workbook (sheet name "3rd party impact assessment", I want pasting to start with cell A7).

4) If user selects "Do nothing" as an exit strategy in more cells of the "Exit strategy" sheet, for example in cell C28, then corresponding exit trigger from cell B28 should be copied over and pasted onto "3rd party impact assessment" sheet, cell A8.

5) If user changes value (in above example in cell C25) that had "Do nothing" of the "Exit strategy" sheet from "Do nothing" to a different value, program would also remove the corresponding entry in "3rd party risk assessment" sheet that was previously copied over and shift other entries up, so the contents of cell A8 in "3rd party impact assessment" sheet would now be moved to A7.

6) I've already got some code in module of the "Exit strategy" sheet that hides/unhides "3rd party risk assessment" sheet based on user's selection, so if someone would have a solution to my problem, please bear that in mind and provide me with the instruction as to where to paste the new code :)

Many thanks in advance!
 

Attachments

  • VBA3.PNG
    VBA3.PNG
    24.2 KB · Views: 40
  • VBA2.PNG
    VBA2.PNG
    76.5 KB · Views: 34
  • VBA.PNG
    VBA.PNG
    49.7 KB · Views: 37

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
It is hard to work with pictures. It would be easier to help if you could use the XL2BB add-in (icon in the menu) to attach screenshots (not pictures) of your two sheets. Alternately, you could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary).
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,183
Members
452,615
Latest member
bogeys2birdies

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