Results 1 to 5 of 5
  1. #1
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Emulating drag & drop (Excel 2000)

    I've had a request from somebody whose workbook I maintain, to build something that can be used to reorder the rows of a spreadsheet, using "something like" drag & drop. That is, they can select a row and drag it to a new position, using a single mouse click/drag/release operation.

    The best I've been able to come up with is a pair of up/down arrows on their custom toolbar, that will nudge the selected row up/down one row at a time. This is apparently not convenient for large scale translations and they would "prefer" drag & drop behaviour. Next week they'll want the sun, the moon & the stars... but in the meantime, does anyone have any ideas on this one please?

    thanks

    Alan

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Emulating drag & drop (Excel 2000)

    The built-in drag and drop functionality should do this:

    - Select an entire row (or a number of rows) by clicking the row header
    - Drag the upper or lower border of the selection to another position.
    - The state of the modifier keys Shift and Ctrl determine what happens when the mouse button is released:

    (none): move row(s) to new location, overwriting existing row(s) (you're prompted.)
    Shift: cut and insert row(s) in new location, pushing existing row(s) down.
    Ctrl: copy row(s) to new location, overwriting existing row(s) (you're prompted.)
    Ctrl+Shift: copy and insert row(s) in new location, pushing existing row(s) down.

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Emulating drag & drop (Excel 2000)

    What is the "goal" of the moving of the rows? How do they want to rearrange?
    Will sorting work?

    For large scale moves you can select several rows by scrolling highlighting the row numbers, then cut, then right click where between where you want to paste them and select insert cut cells. The rows will be extracted, the others moved up and the selected rows inserted between the rows. It can be done manually relatively easily.

  4. #4
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Emulating drag & drop (Excel 2000)

    Thanks Hans! This is a behaviour I never knew about, and nor did the client obviously. I should have looked harder for this, but I'm now not surprised that it's yet another of the plethora of functions provided by cell borders/ corners. This will save lots of work and be a pleasant surprise for all concerned <img src=/S/grin.gif border=0 alt=grin width=15 height=15>!

    Alan

  5. #5
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Emulating drag & drop (Excel 2000)

    Hi Steve

    Unfortunately, sorting won't work for them because they have lots of coded articles that they tend to reorganize into sub-groups, based on functionality of the articles. These functionalities don't seem to relate in any reliable way to the barcodes and other identifiers they assign to their items. The cut/ paste/ insert method you mention is the one they wanted an alternative to. It was actually the way I'd always done it (them too I'd guess) but Hans' enlightening instructions would seem to be just what the doctor ordered.

    cheers

    Alan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •