---
type: link
tags: [public]
created: 2025-10-27T09:17:57.483Z
---# ~e | Subroutine vs Functions

**URL:** [https://www.geeksforgeeks.org/function-and-sub-in-excel-vba/](https://www.geeksforgeeks.org/function-and-sub-in-excel-vba/)

~e | Subroutine vs Functions The key difference between the sub and the functions is that a sub-procedure generally does not return a result whereas functions tend to return a result. Hence if there is a need for having a value post execution of tasks, then place the VBA code under a function or otherwise place the code under a sub-procedure


---
**Keywords:** public
