How to find Number of Occurences of Slash from a strings

Old question, but I thought I would add to the quality of the answer by an answer I found at an excel forum. Apparently the count can also be found using. count =Len(string)-Len(Replace(string,”https://stackoverflow.com/”,””)) Full credit for the answer goes to the original author at:http://www.ozgrid.com/forum/showthread.php?t=45651

How to run a string as a command in VBA

You may be tempted by adding your own string “Executer”: Sub StringExecute(s As String) Dim vbComp As Object Set vbComp = ThisWorkbook.VBProject.VBComponents.Add(1) vbComp.CodeModule.AddFromString “Sub foo()” & vbCrLf & s & vbCrLf & “End Sub” Application.Run vbComp.name & “.foo” ThisWorkbook.VBProject.VBComponents.Remove vbComp End Sub Sub Testing() StringExecute “MsgBox” & “””” & “Job Done!” & “””” End Sub

How to detect if user select cancel InputBox VBA Excel

If the user clicks Cancel, a zero-length string is returned. You can’t differentiate this from entering an empty string. You can however make your own custom InputBox class… EDIT to properly differentiate between empty string and cancel, according to this answer. Your example Private Sub test() Dim result As String result = InputBox(“Enter Date MM/DD/YYY”, … Read more

AutoFilter – Use of SpecialCells

Whenever Excel creates a filtered list on a worksheet, it creates a hidden named range in the background in the Name Manager. This range is not normally visible if you call up the name manager. Use the below code to make your hidden named ranges visible in the name manager (prior to using it, set … Read more

Can’t pass a range to a lambda using Let and Makearray functions

The construct of INDEX() >>:<<INDEX() will work when applied to ranges. Not to arrays AFAIK. It will lead to these errors. Maybe try something like: =LET(range,A1:D2,MAKEARRAY(ROWS(range),COLUMNS(range),LAMBDA(r,c,SUM(INDEX(range,r,SEQUENCE(c)))))) This would resemble the construct of your inital formula. However, in the linked question you have mentioned that you’d like to use SCAN() in combination with BYROW(). You have … Read more

How to highlight selected text within excel

This is the basic principle, I assume that customizing this code is not what you are asking (as no details about this were provided): Sub Colors() With Range(“A1”) .Value = “Test” .Characters(2, 2).Font.Color = vbGreen End With End Sub Small description although it speaks quite for itself: the first “2” refers to the first character … Read more