Search the Community
Showing results for tags 'range'.
-
$aTdslist = _Excel_RangeRead($oWorkbook1, Default, "B1:B" & $LastRow) $aTDSLOC = _Excel_RangeRead($oWorkbook1, Default, "H1:H" & $LastRow) MsgBox(0, "TAKSY OUTPUT LAST ROW", $LastRow) _ArrayTrim($aTDSLOC, 1, 1) _Excel_RangeWrite($oWorkbook1, $oWorkbook1.ActiveSheet, $aTDSLOC, "H2") $oWorkbook1.Sheets("DS_List").Activate $mLastRow = $oWorkbook1.ActiveSheet.UsedRange.Rows.Count $aMdslist = _Excel_RangeRead($oWorkbook1, Default, "B1:B" & $mLastRow) MsgBox(0, "MASTER OUTPUT LAST ROW", $mLastRow) _Excel_RangeReplace($oWorkbook1, Default, "F2:F" & $mLastRow, "N/A", "n/a") ;check the requiremetn $aMLOC = _Excel_RangeRead($oWorkbook1, Default, "F1:F" & $mLastRow) ;LOC NUMBER NEEDS TO BE REPLACED WITH.. _ArrayDisplay($aTDSLOC) _ArrayDisplay($aMLOC) _ArrayDisplay($aMdslist) ;DATA COMPARISION BETWEEN TAKSY LIST WITH LOC FROM SAP TO MASTER LIST WITH LOC. $oWorkbook1.Sheets("OUTPUT").Activate For $i = 1 To $LastRow - 1 For $j = 1 To $mLastRow - 1 If $aTdslist[$i] == $aMdslist[$j] And $aTDSLOC[$i] <> $aMLOC[$j] Then $oExcel.ActiveSheet.Range("H" & $i + 2).Interior.ColorIndex = 3 EndIf If $aTdslist[$i] == $aMdslist[$j] And $aMLOC[$j] == "n/a" And _Excel_RangeRead($oWorkbook1, Default, "I" & ($i + 2)) == "NO KIT" Then $oExcel.ActiveSheet.Range("H" & $i + 2).Interior.ColorIndex = 2 _Excel_RangeWrite($oWorkbook1, $oWorkbook1.ActiveSheet, "*", "H" & ($i + 2)) EndIf Next Next MsgBox($MB_SYSTEMMODAL, "Status", "Loc extraction, comparision and consolidation is Done", 2) DEAR TEAM, I am facing issue w.r.t subscript errors kindly help me in solving... 456.xlsx
-
Script running good but error in line 7. When i run this script : #include <IE.au3> #include <Array.au3> $oIE = _IEAttach ("Shop") $oTable = _IETableGetCollection ($oIE, 1) $aTableData = _IETableWriteToArray ($oTable) For $inumber = 1 To UBound($aTableData) -1 $table = $aTableData[4][$inumber] MsgBox(0, "", $table) Next I got Error: array variable has incorrect number of subscripts or subscript dimension range exceeded
- 17 replies
-
- subscript error
- range
-
(and 1 more)
Tagged with:
-
Hi guys, Wondering, is there a better way, likely to use 'for...next' to add a letter to each range, by moving right -> along a range of columns in excel. I currently use this, but its clunky. If $run = 1 Then $range = "B6:B41" If $run = 2 Then $range = "C6:C41" If $run = 3 Then $range = "D6:D41" If $run = 4 Then $range = "E6:E41" If $run = 5 Then $range = "F6:F41" If $run = 6 Then $range = "G6:G41" If $run = 7 Then $range = "H6:H41" If $run = 8 Then $range = "I6:I41" If $run = 9 Then $range = "J6:J41" If $run = 10 Then $range = "K6:K41" If $run = 11 Then $range = "L6:L41" If $run = 12 Then $range = "M6:M41" If $run = 13 Then $range = "N6:N41" If $run = 14 Then $range = "O6:O41" If $run = 15 Then $range = "P6:P41" If $run = 16 Then $range = "Q6:Q41" If $run = 17 Then $range = "R6:R41" If $run = 18 Then $range = "S6:S41" If $run = 19 Then $range = "T6:T41" If $run = 20 Then $range = "U6:U41" If $run = 21 Then $range = "V6:V41" If $run = 22 Then $range = "W6:W41" If $run = 23 Then $range = "X6:X41" If $run = 24 Then $range = "Y6:Y41" If $run = 25 Then $range = "Z6:Z41" If $run = 26 Then $range = "AA6:AA41" If $run = 27 Then $range = "AB6:AB41" If $run = 28 Then $range = "AC6:AC41" If $run = 29 Then $range = "AD6:AD41" If $run = 30 Then $range = "AE6:AE41" If $run = 31 Then $range = "AF6:AF41" If $run = 32 Then $range = "AG6:AG41" If $run = 33 Then $range = "AH6:AH41" If $run = 34 Then $range = "AI6:AI41" If $run = 35 Then $range = "AJ6:AJ41" If $run = 36 Then $range = "AK6:AK41" If $run = 37 Then $range = "AL6:AL41" If $run = 38 Then $range = "AM6:AM41" If $run = 39 Then $range = "AN6:AN41" If $run = 40 Then $range = "AO6:AO41" If $run = 41 Then $range = "AP6:AP41" If $run = 42 Then $range = "AQ6:AQ41" If $run = 43 Then $range = "AR6:AR41" If $run = 44 Then $range = "AS6:AS41" If $run = 45 Then $range = "AT6:AT41" If $run = 46 Then $range = "AU6:AU41" If $run = 47 Then $range = "AV6:AV41" If $run = 48 Then $range = "AW6:AW41" If $run = 49 Then $range = "AX6:AX41" If $run = 50 Then $range = "AY6:AY41" Normally, if it was going down the rows, i'd use this: For $i = 0 To UBound($iRowCount) - 1 $row = $i + 1 $range = "B"&$row&":B"&$row+1 Next so something like this, but i don't know how to code sequential columns: For $i = 0 To UBound($iColCount) - 1 $col = $i + 1 $range = $col&"1:"&$col&"40" Next If I don't make sense, let me know. Any help would be great. thanks
-
Hi Does someone know if there is an easy way to convert numerical coordinates of row, column to an A1 notation range object (or at least to an A1 notation string)? that is: if I have 2 numerical values for row and column, say row 3 and column 5, I would get an E3 string or better an $oRange object rappresenting that range (a single cell in this case) Thanks on advance.
-
How can I access a variable with its index of a loop inside my if statment. Code: For $i = 0 To UBound($aFileListFootageFolderRe_01) - 1 ... Next If $getTimeNewFootageFolderInit_01 <> $getTimeNewFootageFolder_01 And $aFileListFootageFolderRe_01[$i] == 11) Then ... EndIf I get following error while doing this: Array variable has incorrect number of subscripts or subscript dimension range exceeded.:Thus the error points at this $aFileListFootageFolderRe_01[$i]
-
What is the best way to create an array from a filtered Excel sheet? Let say I've set a filter this way _Excel_FilterSet($oWorkbook, Default, Default, 10, "AutoIt", $xlFilterValues)How can I create an array only from the filtered values only using a range from "T2:ACxxx" whereas xxx is the last line of the selection? Thanks.
-
I'm stuck on how to use for range selection .Cells function. Instead of _Excel_RangeSort($oWorkbook, Default, Default, "AD:AD", Default, Default, $xlYes, False, Default, "AE:AE", Default, "L:L", Default)and $aResult = _Excel_RangeRead($oWorkbook, 1, "S2:AB" & $iRows)which works properly I want to use Cells to select the range. Why? Because the Excel sheet was modified and an additional row was inserted. I want to create the script more dynamically by selection it with Cells because I can search for the column headers. Any idea? Thanks.
-
Hello Autoit Scripters, Using Autoit v3.3.14.1 in Windows 7, I'm trying to write an array of X rows by 34 columns to an Excel 2000 sheet as follows: _Excel_RangeWrite ($workbook, $newsheet, $outarray) It only works up to 160 rows. An array longer than that writes nothing or hangs the system. This needs to work with up to about 32,000 rows. I've displayed $outarray right before the writing function, and it's perfect. I searched around and found an alternative to _Excel_RangeWrite that uses a different approach based on that COM stuff. It gives the same problem! The problem doesn't appear to be affected by how much data is stored in the array, only the number of rows. I must be overlooking something, like maybe a system setting. Any help would be appreciated. Thanks in advance!
-
Hi there. I'm trying to make a resumable winHttp upload. But stuck at reading a file within byte ranges. Tried line functions (filereadline, _filecountlines) but nothing. The file im trying to upload is a video (binary) file. I have to read byte ranges to upload my video partially. is there any udf like fileread($file, startingbytes, endingbytes) any help will be appreciated