xcaliber13 Posted November 8, 2018 Share Posted November 8, 2018 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 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 8, 2018 Moderators Share Posted November 8, 2018 @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! Link to comment Share on other sites More sharing options...
Nine Posted November 8, 2018 Share Posted November 8, 2018 Global $array [20][30] FillTheArray () For $y = 0 to 29 $array [3-1][$y] = $array[14-1][$y] Next That ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
xcaliber13 Posted November 8, 2018 Author Share Posted November 8, 2018 JLogan3o13, put 14 where 3 was and shift to the right. Thank you Link to comment Share on other sites More sharing options...
Nine Posted November 8, 2018 Share Posted November 8, 2018 #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") wolflake 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
xcaliber13 Posted November 8, 2018 Author Share Posted November 8, 2018 Thank you Nine, Exactly what I needed. I now have a good working knowledge of moving columns in an array. Again Thank you Link to comment Share on other sites More sharing options...
Nine Posted November 8, 2018 Share Posted November 8, 2018 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 ! “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now