+ Reply to Thread
Results 1 to 6 of 6

Need VBA to split some special string with prefix or suffix or mid

  1. #1
    Forum Contributor
    Join Date
    02-28-2016
    Location
    australia
    MS-Off Ver
    2019
    Posts
    194

    Need VBA to split some special string with prefix or suffix or mid

    dear experts

    I have set of data where i want split (cut and paste) special characteristic in long string value of column AS:AS

    i have exising sheet disbursement _cases i want move data from sheet Ledger_All to sheet disbursement _cases if where string meets prefix or suffix or mid of string. follow by {Redemption*,Resurrection*,Cancellation*,(Feg-G)*,Disfunction*} in column AS:AS

    if data in sheet disbursement _cases, clear first and copy and paste special string data into sheet




    find the attachment disbursement _cases is expected result
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Need VBA to split some special string with prefix or suffix or mid

    try
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-28-2016
    Location
    australia
    MS-Off Ver
    2019
    Posts
    194

    Re: Need VBA to split some special string with prefix or suffix or mid

    Thanks Experts thanks for your valuable time helped on my thread solved

  4. #4
    Forum Contributor
    Join Date
    02-28-2016
    Location
    australia
    MS-Off Ver
    2019
    Posts
    194

    Re: Need VBA to split some special string with prefix or suffix or mid

    Hi expert i have issue with my real data [A:BR] having issue run time rror 6, overflow can u help on this
    Please Login or Register  to view this content.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Need VBA to split some special string with prefix or suffix or mid

    try change to
    Please Login or Register  to view this content.
    And see how it goes.

  6. #6
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Need VBA to split some special string with prefix or suffix or mid

    Hi All. Another way:

    PHP Code: 
    Sub Macro_8()
    Dim Rng As Rangews As Worksheet
    Application
    .ScreenUpdating FalseSet ws ActiveSheet
    With ws
      
    .Columns("A:B").Insert: .Range("A1:B1") = "<CR>"Set Rng = .Cells(1).CurrentRegion
    End With
    With Rng
    .Columns(1)
      .
    Formula "= IsNumber(Search(""redemption"", AU1)) + IsNumber(Search(""resurrection"", AU1)) + IsNumber(Search(""cancellation"", AU1)) + IsNumber(Search(""(Feg-G)"", AU1)) + IsNumber(Search(""Disfunction"", AU1))"
      
    .Value = .Value: .Range("A1") = "<CR>": .Range("B2") = 0
    End With
    Do While ws.Range("B2") < 2
      With Worksheets
    .Add(, ActiveSheet)
        .
    Range("A1").RowHeight ws.Cells(1).RowHeight
        Rng
    .AdvancedFilter 2ws.Range("B1:B2"), .Range("A1"), False
        
    .Columns("A:B").Delete: .Columns("AS").AutoFit
      End With
      ws
    .Range("B2") = ws.Range("B2")
    Loop
    Application
    .DisplayAlerts Falsews.DeleteApplication.DisplayAlerts True
    End Sub 
    Attached Files Attached Files
    You are always very welcome if you add reputation by clicking the * (bottom left) of each message that has helped you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. prefix and suffix fixed value
    By sradjend in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-12-2019, 11:50 PM
  2. Prefix and Suffix Help
    By Scott Holmes in forum Excel General
    Replies: 3
    Last Post: 10-06-2015, 11:58 AM
  3. vba to remove T of every string of prefix and 1 of suffix with text
    By MicroTees in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2015, 03:10 PM
  4. How to add prefix and suffix to a cell?
    By adi26 in forum Excel General
    Replies: 2
    Last Post: 08-28-2009, 03:21 AM
  5. Add Suffix & Prefix
    By di22y in forum Excel General
    Replies: 1
    Last Post: 06-25-2009, 06:34 PM
  6. adding a string prefix/suffix to a cell
    By elroy in forum Excel General
    Replies: 4
    Last Post: 03-08-2007, 04:47 AM
  7. Prefix and Suffix
    By Clare in forum Excel General
    Replies: 2
    Last Post: 01-30-2006, 03:30 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1