02-08-2015, 03:03 PM
Macro Macro2488
Macro Macro2489
Macro Macro2490
;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];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}";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)