Oct 08 2021 11:00 AM
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
Oct 09 2021 10:18 PM
Solution@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
Nov 06 2021 01:08 PM
Sorry for taking so long to reply! Thank you very much for your help, its really appreciated. This will take some time xD
Oct 09 2021 10:18 PM
Solution@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