You are currently viewing No More Excel Formulas Let AI Handle Your Spreadsheets
Excel-Formulas-1

No More Excel Formulas Let AI Handle Your Spreadsheets

Excel Formulas Let AI

No More Excel Formulas Let AI Handle Your Spreadsheets
Set ws = ActiveSheet

' last used row in column A
lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row

' Late binding RegExp
Set re = CreateObject("VBScript.RegExp")
re.Pattern = "^(https?:\/\/)?(www\.)?shopseva\.in\/"   ' start पर domain match
re.IgnoreCase = True
re.Global = False

For i = 1 To lastRow
    inputStr = CStr(ws.Cells(i, "A").Value)
    If Len(Trim(inputStr)) > 0 Then
        outStr = re.Replace(inputStr, "")  ' prefix हट गया
        ws.Cells(i, "B").Value = outStr
    End If
Next i

MsgBox "Done — converted values are in Column B.", vbInformation
Set ws = ActiveSheet

' Last row nikalna
lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row

' Loop karte hue har row ke aage "Disallow: /" jodo
For i = 1 To lastRow
    If ws.Cells(i, 1).Value <> "" Then
        ws.Cells(i, 1).Value = "Disallow: /" & ws.Cells(i, 1).Value
    End If
Next i

MsgBox "'Disallow: /' sabhi rows ke aage add kar diya gaya.", vbInformation

End Sub

No More Excel Formulas Let AI Handle Your Spreadsheets
No More Excel Formulas Let AI Handle Your Spreadsheets
No More Excel Formulas Let AI Handle Your Spreadsheets
No More Excel Formulas Let AI Handle Your Spreadsheets
No More Excel Formulas Let AI Handle Your Spreadsheets
No More Excel Formulas Let AI Handle Your Spreadsheets

Leave a Reply