Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[question] If counter 0
#2
Macro Macro26
Code:
Copy      Help
;Suppose you have these values from cell A1 to A15:
;1, 2, 0, 3, 4, 0, 5, 6, 0, 7, 8, 0, 9, 10, 0
;This will print "Title Test" for every cell that has a value not equal to ZERO.

int i row
str outTitle="Title Test"
ARRAY(str) data a1
ExcelSheet es.Init("")
es.CellsToArray(data "A1:A15") ;;  Get Range data from column A
for row 0 data.len; a1[]=data[0 row]
for i 0 a1.len
,if StrCompare(a1[i] "0")
,,out "a[%d] = %s --> %s" i+1 a1[i] outTitle
,else
,,out "a[%d] = %s" i+1 a1[i]


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)