Jump to content

Recommended Posts

Posted (edited)

I am unable compare two 1d arrays  and to assign values to third array $aDSloc1, Please help me out

Local $aDSloc1[$LastRow]
For $i = 1 To $LastRow
    For $j = 1 To $LastRow1
        If $aDSlist1[$i]== $aLocDS1[$j] Then
            $aDSloc1[$i] = $aDSloc1[$i]+"," + $aLocNr1[$j]

        EndIf
    Next
Next

Edited by VinMe
Posted

FOR $J=0 To $lastrow-1

???

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

ceratainly yes mLipok!! that was my stupid mistake. updated code looks like this.

Local $aDSloc1[1] = [""]
For $i = 1 To $LastRow
    For $j = 1 To $LastRow1-1
        If $aDSlist1[$i] == $aLocDS1[$j] Then
            $aDSloc1[$i] = $aDSloc1[$i] + "," + $aLocNr1[$j]
        EndIf

    Next
    ReDim $aDSloc1[$LastRow]

    _Excel_RangeWrite($oWorkbook, $oWorkbook.ActiveSheet, $aDSloc1[$i], "H" & ($i))
Next

But one more question here, is the below code line is good? i am not getting the right result so..

$aDSloc1[$i] = $aDSloc1[$i] + "," + $aLocNr1[$j]

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
×
×
  • Create New...