We help IT Professionals succeed at work.

drag and drop (but keep all) lines

162 Views
Last Modified: 2017-05-23
I had this question after viewing move line without macro or copy/paste.


I want to keep all the rows. All the rows are important to me. I just want to switch the order. I tried pressing both 'okay' and 'cancel'
without macro or copy/paste

is there a drag and drop rows functionality in excel 2010 for windows 10

for example

1
2
3
4

changed to

1
4
2
3

because I moved the 4
Comment
Watch Question

Joe WinogradDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018

Commented:
To change the order, you must save the target row in a different location. For example, if you want to swap the order of 2 and 4, first move 2 to a safe spot, say row 5, then move 4 to where 2 was, and then move the saved 2 (now in 5) to 4. Another way is to add a row after 1 and then drag-and-drop 4 to the new (empty) row. Yet another way is to use the clipboard, but you indicated that you don't want to use copy-paste, but just drag-and-drop. Regards, Joe

Author

Commented:
I think you are suggesting
1
2
3
4


to

1
2
3
4
2

to

1
4
3
4
2
Joe WinogradDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018

Commented:
Not quite. Remember, drag-and-drop is a move, not a copy. So the sequence is this:

1
2
3
4

to

1

3
4
2

to

1
4
3

2

to

1
4
3
2

Note that drag-and-drop can be a copy, if you keep the Ctrl key pressed during the drag-and-drop. When you do that, the four-arrow move icon turns into a plus-sign icon, signifying the copy operation, rather than the move operation.

Author

Commented:
when I did this move i could replicated your steps

I dont see
ok
cancel

dialog box

anymore

maybe dialog box is only there when I did long lines


I dont understand what you mean by 'ctrl' key
Developer
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT

Commented:
As mentioned in all your other questions, there is no direct functionality available to do a drag-drop as you are describing. The easiest way is to do as I suggested a couple questions ago by using Cut > Insert Cut Cells. You don't need to select the entire row, nor insert a blank row before performing the actions. The steps to take are:

1. Right-click the cell you wish to move (in this case the cell containing 4)
2. Select "Cut"
3. Right-click you wish to "move" the cell to (in this case the cell containing 2)
4. Select "Insert Cut Cells"
Joe WinogradDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018

Commented:
Hi Wayne,
As most of us know (including the asker, I'm sure), there are better, more efficient ways to achieve the end result. But, for whatever reason, the asker has been emphatic in saying that he doesn't want to use macros or copy/paste (and, by extension, I'd say, cut/insert). He has emphasized that he wants a solution that uses drag-and-drop of the rows, so that's what's being presented to him. Your solution is nice (and works for whole rows, not just cells), but it isn't what he asked for in this question. In many (most) cases, I'm fine with presenting other/better methods than the question posed, but in this particular case, the asker has been quite emphatic in his requirements — drag-and-drop of the rows. Just my perspective, of course. Regards, Joe
CERTIFIED EXPERT

Commented:
Joe,

Understood, but there's a lot of going around in circles with this question and it's asker. They want drag-drop (without overwriting) and have been told it's not possible and were offered a number of alternatives. They're not happy with those alternatives, so have asked again if there is drag-drop functionality. Again they've been told no.

I'll state it very clearly for the asker before we go though this again...

Reordering cells/rows is not possible using drag-drop. The alternative I've posted with Cut>Insert Cut Cells is I feel the easiest and closest to what they want as it involves 2 very simple steps.
Joe WinogradDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018

Commented:
> Reordering cells/rows is not possible using drag-drop.

Well, it is, as my video shows, but it takes extra drag-and-drop steps.

> The alternative I've posted with Cut>Insert Cut Cells is I feel the easiest

That's a very easy method, and works on a whole row — even multiple rows.

> and closest to what they want as it involves 2 very simple steps

Yes, your steps are simple, but I don't think it is closest to what he wants. He didn't say he wants a simple method; he said he wants a drag-and-drop method. At this point, I'll head back to the peanut gallery and wait to hear from the asker — but, agreed, your method is very nice! Regards, Joe

Author

Commented:
thanks so much for the video
I needed to watch 2 times to understand
Joe WinogradDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2018

Commented:
You're welcome. I'm glad you found the video to be helpful. Regards, Joe

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.