Where to find a VBA function's source in Excel

I hope I understand your question... From reading other answers I see that it is not a recorded macro. It's safe to assume then that someone wrote it in VBA. Try the following:

  1. Press Alt+F11 to open your VBA editor
  2. Click View -> Project Explorer (it may already be visible.) (or: CTRL+R)
  3. You should see "VBAProject(your workbook name.xls). Click that.
  4. Click one of the sheets under 'Microsoft Excel Objects' in the Project explorer.
  5. Click View -> Code
  6. Click Edit -> Find
  7. Type the name of the function in the box
  8. Ensure 'Current Project' is selected.
  9. Click Find Next

That should take you to where the function is written.


Press ALT + F11 to see the VBA project window. You should be able to find the code for the custom function in there.