VBA Functions

Kartick0075

New Member
Joined
Jan 9, 2020
Messages
18
Office Version
  1. 2019
Platform
  1. Windows
Hello Sir, I'm Kartick from India. I'm a VBA learner. Recently, I've faced some problems in my office work. In order to solve those problems, I came up with 3 ideas. But due to shallow knowledge in VBA, I couldn't implement those ideas in reality to sort out those issues. I've given my 3 questions below one by one. I believe, you'll definitely help me.

001) Is it possible to create Spilled Array (Dynamic Array) like function in VBA. I mean to say creating User Defined Function like Spilled / Dynamic Array Functions (Filter, RandArray, Sequence, Sort, SortBy and Unique Functions) in Excel (Office 365 Version).

002) How do I split First Names, Middle Names (If Available) and Last Names with one single User Defined Function in VBA? Is it also possible in VBA?

003) How to use VBA Split Function with Multiple Parameters?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi Kartick from India. 1) Yes Place your Public UDF in module code and the it can be used in a worksheet
2 & 3) Here's an example of using the split function. Place your name in A1 with blank space between names (ie. Bob Isyour Uncle)
Code:
Sub test()
Dim SplitStr As Variant, Cnt As Integer
SplitStr = Split(ActiveSheet.Range("A" & 1) & " ")
For Cnt = LBound(SplitStr) To UBound(SplitStr) - 1
MsgBox SplitStr(Cnt)
Next Cnt
End Sub
HTH. Dave
 
Upvote 0

Forum statistics

Threads
1,214,896
Messages
6,122,132
Members
449,066
Latest member
Andyg666

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top