Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Conditional String Search with Excel?
#6
So you want to print out the value in B column when the condition matches both "apple" and "X" right?
Here is one solution:

Macro Select Column 1 and 4
Code:
Copy      Help
ExcelSheet es.Init("" 4 "$Documents$\Test1.xlsm")
str s1 s2; int row=1
ARRAY(str) a
rep
,if(!es.GetCell(s1 1 row)) break
,es.GetCell(s2 3 row)
,if (s1="apple" and s2="X")
,,es.GetCell(a[] 2 row)
,row+1
es.Save
for int'i 0 a.len
,out a[i]


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)