Hello,
There has to be a better way to do this...a more efficient way..
I have a number entered from an Inputbox that I'm looking for within a column of cells. Right now I'm just using and if..then - I look at a specific cell and if it's not the number I move to the next cell and so on until I find the number. Is there a way to have the code look at a column range and find the number? Instead of having to add each snippet of elseif for each number possibility..
Thanks IA,
cherkey
Better way to search thru cells?
Re: Better way to search thru cells?
Oh wait...I just found this...would this work?
cherkey
Sub SearchARange
REM Author: Andrew Pitonyak
Dim oSheet
Dim oRange
Dim oFoundCell
oSheet = ThisComponent.getSheets().getByIndex(0)
oRange = oSheet.getCellRangeByName("F7:H11")
oFoundCell = SimpleSheetSearch("41", oRange, False)
End Sub
cherkey
Sub SearchARange
REM Author: Andrew Pitonyak
Dim oSheet
Dim oRange
Dim oFoundCell
oSheet = ThisComponent.getSheets().getByIndex(0)
oRange = oSheet.getCellRangeByName("F7:H11")
oFoundCell = SimpleSheetSearch("41", oRange, False)
End Sub
Re: Better way to search thru cells?
Looks like you answered your own question.
Do you have the function code Andrew wrote? Find it at:
http://www.pitonyak.org/oo.php
Mark
Do you have the function code Andrew wrote? Find it at:
http://www.pitonyak.org/oo.php
Mark
OOo 3.0.X on MS Windows Vista + Windows XP