drag and drop settings

KentKHI

Active Member
Joined
Oct 1, 2004
Messages
492
Hey Guys!

Is there a way to set the drag and drop settings to drag and drop values only, not formulas?

Thanks,

Kent
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi, KentKHI !

Is there a way to set the drag and drop settings the way you want? Not to my knowledge.

Here is some code to try out. Formulas are dropped as values, just what you asked.
This could give you an idea to start.
Be warned: this kind of stuff has some inconvenients. Most of the times users don't like this. So add some warnings for them if you use this.
Testing you'll see what happens.

You will need an extra (hidden) sheet named "log" (or whatever)
This code is put in the worksheet module.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target(1).Formula = Sheets("log").Range("A1") Then Target = Target
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Target(1).Select
Sheets("log").Range("A1") = "'" & Target(1).Formula
End Sub

regards,
Erik
 
Upvote 0

Forum statistics

Threads
1,203,544
Messages
6,056,029
Members
444,840
Latest member
RazzelDazel

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