Excel Data Streamer reading cells

%3CLINGO-SUB%20id%3D%22lingo-sub-2828175%22%20slang%3D%22en-US%22%3EExcel%20Data%20Streamer%20reading%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2828175%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20there%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20seem%20to%20be%20struggling%20with%20something%20very%20basic%2C%20however%20I%20cant%20find%20any%20info%20to%20help%20me.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20simply%20trying%20to%20read%20values%20from%20different%20cells%20via%20my%20Arduino.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EE.g.%26nbsp%3B%20%26nbsp%3B%20Read%20number%20in%20cell%20A1%20--%26gt%3B%20get%20response%20via%20Arduino%20(true%2Ffalse)%20--%26gt%3B%20Read%20next%20cell%20A2%20--%26gt%3B%20etc.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20project%20is%20just%20SMSing%20different%20cell%20phone%20numbers%20from%20a%20list%20in%20excel%2C%20and%20waiting%20for%20a%20response%20to%20test%20if%20they%20are%20still%20active.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%20would%20really%20be%20appreciated.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3ENick%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2828175%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2830731%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Data%20Streamer%20reading%20cells%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2830731%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1179998%22%20target%3D%22_blank%22%3E%40NTolken%3C%2FA%3E%26nbsp%3BMaybe%20this%20is%20a%20step%20in%20the%20right%20direction%3F%20You%20will%20have%20to%20change%20to%20your%20Arduino%20function%20that%20I%20am%20not%20familiar%20with%20and%20thus%20inserted%20a%20place%20holder%20returning%20true%20or%20false.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3ESub%20testNumbers()%0A%20%20%20%20For%20Each%20cell%20In%20Range(%22a%3Aa%22)%0A%20%20%20%20%20%20%20%20'test%20conditions%0A%20%20%20%20%20%20%20%20If%20cell.Row%20%26gt%3B%20Range(%22a1%22).SpecialCells(xlCellTypeLastCell).Row%20Then%0A%20%20%20%20%20%20%20%20%20%20%20%20'done%0A%20%20%20%20%20%20%20%20%20%20%20%20Exit%20For%0A%20%20%20%20%20%20%20%20ElseIf%20cell.Value%20%3D%20%22%22%20Then%0A%20%20%20%20%20%20%20%20%20%20%20%20'do%20nothing%0A%20%20%20%20%20%20%20%20Else%0A%20%20%20%20%20%20%20%20%20%20%20%20'apply%20your%20code%0A%20%20%20%20%20%20%20%20%20%20%20%20cell.Offset(0%2C%201).Value%20%3D%20arduino(cell.Value)%0A%20%20%20%20%20%20%20%20End%20If%0A%20%20%20%20Next%20cell%0AEnd%20Sub%0A%0A%0AFunction%20arduino(number%20As%20String)%0A%20%20%20%20If%20number%20%26gt%3B%20200%20Then%20%20%20'your%20code%20here%0A%20%20%20%20%20%20%20%20arduino%20%3D%20True%0A%20%20%20%20Else%0A%20%20%20%20%20%20%20%20arduino%20%3D%20False%0A%20%20%20%20End%20If%0AEnd%20Function%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hello there

 

I seem to be struggling with something very basic, however I cant find any info to help me.

 

I'm simply trying to read values from different cells via my Arduino. 

 

E.g.    Read number in cell A1 --> get response via Arduino (true/false) --> Read next cell A2 --> etc.

 

The project is just SMSing different cell phone numbers from a list in excel, and waiting for a response to test if they are still active.

 

Any help would really be appreciated.

 

Thanks

Nick

 

1 Reply

@NTolken Maybe this is a step in the right direction? You will have to change to your Arduino function that I am not familiar with and thus inserted a place holder returning true or false.

Sub testNumbers()
    For Each cell In Range("a:a")
        'test conditions
        If cell.Row > Range("a1").SpecialCells(xlCellTypeLastCell).Row Then
            'done
            Exit For
        ElseIf cell.Value = "" Then
            'do nothing
        Else
            'apply your code
            cell.Offset(0, 1).Value = arduino(cell.Value)
        End If
    Next cell
End Sub


Function arduino(number As String)
    If number > 200 Then   'your code here
        arduino = True
    Else
        arduino = False
    End If
End Function