Hi, I want to use match or hlookup inside an open office basic macro,
and I am having a lot of trouble with it.
I've written an equivalent function that does not use match, but this
is very slow.
I've googled for days on this, and I can't tell if I'm completely
offbase on what I want to do. Is it legal to use a match formula in a
basic script?
Here's an idea of the code I want to write:
sheet2_column=sheet2.match(heading,"A1:IV1",0)
This is the code that I have to do the same rough thing:
function search_row_for_text (rw, txt)
blank_count = 0
search_row_for_text=-1
' read each header of sheet2 until one matches the string passed in
for i = 0 to 255
tmptxt = Sheet2.getcellbyposition (i,0).string()
if tmptxt = txt then
search_row_for_text=i
i=255
endif
next
end function
--
Patrick Draper --- [EMAIL PROTECTED]
Austin, Texas --- http://www.pdrap.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]