Jump to content

Recommended Posts

Posted

Hello,   Could I get a pointer in the correct direction to be able to move columns in an array.    For example moving column 14  to column 3.   I have no problem doing this in excel but I am trying to learn to do this in an array.  Thank you

  • Moderators
Posted

@xcaliber13 are you wanting to delete 3 and replace it with 14, swap 3 and 14 or put 14 where 3 was and just shift to the right/left? Any more information you could provide would be greatly helpful.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Posted
#include <Array.au3>

Local $aArray_Base[15][20]
For $i = 0 To 14
    For $j = 0 To 19
        $aArray_Base[$i][$j] = $i & "-" & $j
    Next
Next

_ArrayDisplay ($aArray_Base, "before")

_ArrayColInsert ($aArray_Base, 3)

For $i = 0 to 14
  $aArray_Base[$i][3] = $aArray_Base[$i][15]
Next

_ArrayColDelete ($aArray_Base, 15) 

_ArrayDisplay ($aArray_Base, "after")

 

  • xcaliber13 changed the title to Help with moving columns in an Array (Solved)
Posted
41 minutes ago, xcaliber13 said:

Thank you Nine,   Exactly what I needed.  I now have a good working knowledge of moving columns in an array.  Again Thank you

Glad I could help you out !

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...