User Profile
Subodh_Tiwari_sktneer
Silver Contributor
Joined 7 years ago
User Widgets
Recent Discussions
- 2KViews0likes6Comments
Re: Need numbers from within cells
bsrujan Okay, please try this and see if this works for you. Function ExtractNumber(ByVal str As String) As Variant Dim Matches As Object With CreateObject("VBScript.RegExp") .Global = False .Pattern = "\d+" If .test(str) Then Set Matches = .Execute(str) ExtractNumber = Matches(0) + 0 If (Len(ExtractNumber) < 7) Or (Len(ExtractNumber) > 9) Then ExtractNumber = "" End If End With End Function1.2KViews0likes3CommentsRe: Need numbers from within cells
bsrujan You may place this UDF on a standard module like Module1 and then use it like a regular function on the worksheet. Function ExtractNumber(ByVal str As String) As Long Dim Matches As Object With CreateObject("VBScript.RegExp") .Global = False .Pattern = "\d{7,9}" If .test(str) Then Set Matches = .Execute(str) ExtractNumber = Matches(0) End If End With End Function Assuming your string is in A2 then try... =ExtractNumber(A2)1.2KViews0likes5CommentsRe: How do I create a validation dropdown that uses the FILTER function?
RedNectar Please look at the sheet called "Validation" in the attached which contains a setup for the validation lists and then on the attribute_tab sheet, the first validation uses =Validation!$A2# as the source for the validation list which is then copied down. See if this helps.7.6KViews1like2CommentsRe: Formula returning #value
62Mojo Do what Patrick suggested and your existing formula will work. Btw you have used the SUM function in the wrong way, try it like this and your formula will work. The advantage of using the SUM function as suggested below is, it ignores the text values. =IF(SUM(G31:G32)>0,SUM(G31*0.5,G32),"")2KViews1like1CommentRe: Formula to match Day of Week Name
Ron_Hockman1525 For older versions of Excel, you may try the following formula... =(LEN(A2)-LEN(SUBSTITUTE(A2,TEXT($B$1,"dddd"),"")))/LEN(TEXT($B$1,"dddd")) For Excel 365, you may also try the following formula... =SUM((TEXTSPLIT(A2,"; ")=TEXT($B$1,"dddd"))*1)1.1KViews1like1Comment- 2.9KViews0likes0Comments
Re: VBA Run-time error '1004' when Hide/Show Rows
jmpjmp This is because the ListFillRange is set to A1:A10 and you are trying to hide those rows. An easy fix is to use On Error Resumen Next like below... On Error Resume Next Rows(ShowRows).Hidden = False Rows(HideRows).Hidden = True On Error GoTo 03.2KViews0likes2Comments
Recent Blog Articles
No content to show