• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Creat user define function |VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Creat user define function |VBA & Macros|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosCreat user define function
sp_PrintTopic sp_TopicIcon
Creat user define function
Avatar
vasim khatik
Member
Members
Level 0
Forum Posts: 26
Member Since:
July 15, 2018
sp_UserOfflineSmall Offline
1
October 25, 2022 - 11:48 pm
sp_Permalink sp_Print

Dear all 

I have udf, reference to attached image Help.pngImage Enlarger

sp_PlupAttachments Attachments
  • sp_PlupImage Help.png (59 KB)
Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1510
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
2
October 26, 2022 - 9:16 am
sp_Permalink sp_Print

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

Avatar
vasim khatik
Member
Members
Level 0
Forum Posts: 26
Member Since:
July 15, 2018
sp_UserOfflineSmall Offline
3
October 26, 2022 - 7:01 pm
sp_Permalink sp_Print sp_EditHistory

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

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1510
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
4
October 27, 2022 - 9:47 pm
sp_Permalink sp_Print

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

Avatar
vasim khatik
Member
Members
Level 0
Forum Posts: 26
Member Since:
July 15, 2018
sp_UserOfflineSmall Offline
5
October 29, 2022 - 3:27 pm
sp_Permalink sp_Print

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

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1510
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
6
October 29, 2022 - 7:05 pm
sp_Permalink sp_Print

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

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Jessica Stewart, Mark Carlson, Calvin Richardson, Debi Morgan
Guest(s) 2
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Debi Morgan
yashal minahil
Oluwadamilola Ogun
Yannik H
dectator mang
Francis Drouillard
Orlando Inocente
Jovitha Clemence
Maloxat Axmatovna
Ricardo Freitas
Forum Stats:
Groups: 3
Forums: 24
Topics: 6201
Posts: 27185

 

Member Stats:
Guest Posters: 49
Members: 31861
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.