15th June 2025 - Completed the Excel Using AI Workshop conducted by Aditya Goenka of BE10X and OfficeMaster.IN
exceltrainerahmedabad@gmail.com
The strange case of the domain www.excel-vba-ahmfca.com has gone viral in my life, because firstly, I had not ever updated that website that I had got from the www.websites.co.in website.
I have till now been 'banned' from Facebook and Wordpress, but those were for mostly genuine reasons, where I had unwittingly crossed the file line between what out to be and what ought not to be!!!
This is a word document relating to top points in the document 100-ChatGPT-Tips.PDF, shot out by Microsoft CoPilot.
A User Defined Function is a function you create using VBA to perform custom calculations that Excel’s built-in functions can't easily do.
Extend Functionality: Excel’s built-in functions may not meet specific business or technical needs.
Reusability: UDFs can be reused across different workbooks and shared with others.
Automation: You can integrate UDFs into broader macros to perform full automation workflows.
Open the VBA Editor:
Press ALT + F11
in Excel.
Insert a Module:
Go to Insert > Module
.
Write Your Function:
vbaFunction AddNumbers(x As Double, y As Double) As Double AddNumbers = x + y End Function
Use It in Excel:
Go back to Excel and use =AddNumbers(5, 3)
in a cell.
UDFs cannot modify the Excel environment (e.g., they can’t change cell formatting or move cells). They're limited to returning a result.
Execution speed: UDFs can be slower than built-in functions if written inefficiently or if used repeatedly over large ranges.
Security warning: Excel disables macros by default for security; users must enable them to run UDFs.
vbaFunction CtoF(celsius As Double) As Double CtoF = (celsius * 9 / 5) + 32 End Function
Use as: =CtoF(25)
, which returns 77
.
Feature | UDF | Macro |
---|---|---|
Returns a value | Yes | No (usually performs actions) |
Used in worksheet cells | Yes | No |
Modifies worksheet | No | Yes |
Triggered automatically | Yes (when cell recalculates) | No (runs on command or event) |
UDFs can't access things like:
Message boxes or input boxes (MsgBox
, InputBox
)
Formatting or inserting rows/columns
Worksheets not currently open or recalculating
Wow, shocking, but true!!
CA Vikram Shankar Mathur
https://www.exceltrainerahmedabad.com/2025/05/
https://www.linkedin.com/company/exceltrainerahmedabad
https://www.facebook.com/excelvbaahmfca
15th June 2025 - Completed the Excel Using AI Workshop conducted by Aditya Goenka of BE10X and OfficeMaster.IN Happy to share that I have t...