Forum

Creat user define f...
 
Notifications
Clear all

Creat user define function

6 Posts
2 Users
0 Reactions
71 Views
(@khatikvasim13)
Posts: 24
Eminent Member
Topic starter
 

Dear all 

I have udf, reference to attached image Help.png

 
Posted : 26/10/2022 9:48 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Vasim,

Please state what it is that you want as a result.  

Please provide a workbook with code.  An image isn't a huge amount of use if it means we have to type out everything by hand.

regards

Phil

 
Posted : 26/10/2022 7:16 pm
(@khatikvasim13)
Posts: 24
Eminent Member
Topic starter
 

Thanks for given feedback 

I am attached workbook. I have column M my answer using B37:B48 criteria given the rank basis of criteria. My formula work is perfectly but this is so large and that is my file size is large so I have this formula short to creat UDF 

Thanks

Philip Treacy

 
Posted : 27/10/2022 5:01 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Vasim,

No need for VBA, you can replace your IF statements with a lookup

=VLOOKUP(ABS(I6),$Q$4:$R$9,2,TRUE)

See attached file for my solution.

Regards

Phil

 
Posted : 28/10/2022 7:47 am
(@khatikvasim13)
Posts: 24
Eminent Member
Topic starter
 

Thank mr. Phil 

But my problem still not solve

I am change to tolerance -1 ,1 to -0.5 , 0.5 answer is not proper. Change tol. my first file and see the answer....

Thanks 

Regards 

Vasim

 
Posted : 30/10/2022 1:27 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Vasim,

If you change tolerances then you need to change the values in the lookup table that looks up the tolerance and the corresponding value (1,2,3 etc).

Regards

Phil

 
Posted : 30/10/2022 5:05 am
Share: