View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
André André is offline
external usenet poster
 
Posts: 2
Default Problem with find function in VBA

The project is the budget management of the enterprise
I give a sample

A B
-------------------------------------
1 | Production | Impro |
2 | 10000 | 11001 |
-------------------------------------
3 45 50
4 40 49


Well, the header is the cost center and the data is the number of
hours. The hours is the result of a SQL. For each cost center, i must
fill the good column with the good number.

I use the function with the cost center for the parameter for finding
the column number. If the cost center is not the last column of the
area, the function work correctly otherwise not.

for the sample above

cl = cherche (feuille, "10000", "A2:B2", false) in this case cl = 1
cl = cherche (feuille, "11001", "A2:B2", false) in this case cl = 0

but, if i use the function

cl = cherche (feuille, "11001", "A2:D2", false) in this case cl = 2

I don't understand

Andre



On Tue, 3 May 2005 10:17:28 -0400, "Tom Ogilvy"
wrote:

What is the value? Find often has problems with dates.