View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] hermac@pandora.be is offline
external usenet poster
 
Posts: 18
Default Capture te first n digits of a range

Hello,
I'm writing a UDF that defines R as range(A1:A10)which contains either
nothing or integer numbers 10000.
The UDF uses a multi-condition sum that should look like :

Application.Sumproduct
((Range("A1:A10")1000)*(Range("A1:A10")<2000)*(Ra nge("B1:B10")))
But the problem is that instead of range("A1:A10") I want the left 4
digits of A1:A10 to compare with.
What is the most efficiënt code for this ?

Thanks for your help.
Herman