Kiti Posted June 17, 2008 Share Posted June 17, 2008 I have a big 2D array, and I want to do something with the last value of the array. But the array lenght is varriable. Is there any way to do this ? As in Java is Name.arraylenght . Thanks! Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
narayanjr Posted June 17, 2008 Share Posted June 17, 2008 look up UBound() its basically the same thing Link to comment Share on other sites More sharing options...
Kiti Posted June 17, 2008 Author Share Posted June 17, 2008 look up UBound() its basically the same thing Hmm... so, how can I make this code correct, to replace the last "Blocks of data" with my msg? #include <ExcelCOM_UDF.au3> Local $oExcel = _ExcelBookNew(1) For $i = 1 to 5 _ExcelWriteCell($oExcel, "Blocks of data", $i, 1) Next $Find = _ExcelFindInRange($oExcel, "Blocks of data", 1, 1, 5, 1, 0, 2, False, "") $lastcell = Ubound($Find, x); what's "x"? what to put here? _ExcelWriteCell($oExcel, "This is the 5th result", $lastcell[3], $lastcell[4]) ; is this good? Thanks for your help! Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
narayanjr Posted June 17, 2008 Share Posted June 17, 2008 (edited) Ive never really used any of the excel functions so I dont know anything about them but $Rows = UBound($Find,1);Gives the number of rows in the Array $Columns = UBound($Find,2);Gives the number of columns in the Array $Rows - 1 ;= Index of Last element in Row $Column - ;1 = Index of Last element in Column Hope that helps EDIT: Yeah it should have said Column i Copy pasted and forgot to change that word my bad Edited June 17, 2008 by narayanjr Link to comment Share on other sites More sharing options...
Kiti Posted June 17, 2008 Author Share Posted June 17, 2008 (edited) Ive never really used any of the excel functions so I dont know anything about them but $Rows = UBound($Find,1);Gives the number of rows in the Array $Columns = UBound($Find,2);Gives the number of columns in the Array $Rows - 1 ;= Index of Last element in Row $Column - ;1 = Index of Last element in Row Hope that helps Yep, it helped me a lot. Thank you very much, narayanjr ! But, isn't it: "$Column - 1 ; = Index of Last element in Column"? Edit: Sorry for the double-triple post, my internet is buggy and I've pressed "Add reply" several times, because I didn't see any response. I've deleted them now Edited June 17, 2008 by Kiti Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 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