Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excel Single Row Checking
#2
Macro Macro2488
Code:
Copy      Help
;gets all cells in the same row as the selected cell
ExcelSheet x.Init
int row; x.GetRangeInfo("<sel>" 0 row)
ARRAY(str) a; x.CellsToArray(a ExcelRow(row))
int i
for i 0 a.len(1)
,out a[i 0]
Macro Macro2489
Code:
Copy      Help
;finds text in cells in the same row as the selected cell
str textToFind="e"
ExcelSheet x.Init
int row; x.GetRangeInfo("<sel>" 0 row)
ARRAY(Excel.Range) a
if x.Find(textToFind a 2|4 ExcelRow(row))
,int i
,for i 0 a.len
,,Excel.Range& r=a[i]
,,;out r.Address(@ @ 2)
,,out F"col={r.Column} row={r.Row}"
Macro Macro2490
Code:
Copy      Help
;finds and highlights text in cells in the same row as the selected cell
str textToFind="e"
ExcelSheet x.Init
int row; x.GetRangeInfo("<sel>" 0 row)
ARRAY(Excel.Range) a
if x.Find(textToFind a 2|4 ExcelRow(row))
,int i
,for i 0 a.len
,,Excel.Range& r=a[i]
,,out F"col={r.Column} row={r.Row}"
,,;color
,,EXCELFORMAT f.cellColor=0xe0ff
,,x.Format(ExcelRange(r.Column r.Row) f)
,x.Activate(4)


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)