+ Reply to Thread
Results 1 to 3 of 3

Delete the trailing sign "/ /" & merge number with "/" and cancel merged cells

  1. #1
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    726

    Delete the trailing sign "/ /" & merge number with "/" and cancel merged cells

    Hi guys .
    I search for way to arrange data as I put it in LIST sheet.
    in SH1 sheet data are not arranged .
    I need fixing somethings :
    1- any merged cells in any column should be cancelled
    2-in column C there cells are divided for each individual cell like "/" & A4710 as in example . I want merging
    and write some words " SALES INVOICE NUMBER" to become SALES INVOICE NUMBER / A4710 as in LIST sheet
    3-if there is two from "/ /" should delete one of them to become one "/" when merge with number
    4- should add TOTAL word in last row for column C .
    thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi, try this !


    According to your attachment a starter VBA demonstration to paste only to the SH1 worksheet module :

    PHP Code: 
    Sub Demo1()
        If [
    A3].MergeCells And (UsedRange.Rows.Count And 1Then
            Application
    .ScreenUpdating False
            UsedRange
    .UnMerge
            UsedRange
    .WrapText False
        With Cells
    (UsedRange.Rows.Count1)
            .
    Resize(, 3).Borders(8).Weight 2
            
    .Resize(, 3).HorizontalAlignment 7
            
    .Resize(, 3).Interior.Color 15921906
            
    .Font.Bold True
            
    .Font.Size 10
            
    .Value "T O T A L"
        
    End With
        
    For R& = UsedRange.Rows.Count 1 To 4 Step -2
            Cells
    (13).Borders(8).LineStyle 1
            Cells
    (13) = "SALES INVOICE NUMBER / " Trim(Cells(R3))
            
    Rows(R).Delete
        Next
            UsedRange
    .Columns(3).AutoFit
            Application
    .ScreenUpdating True
        End 
    If
    End Sub 
    ► Do you like it ? ► So thanks to click on bottom left star icon « Add Reputation » !

  3. #3
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    726

    Re: Delete the trailing sign "/ /" & merge number with "/" and cancel merged cells

    Hi Marc again ,
    your code works as I want .
    thank you so much .

+ 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. Replies: 5
    Last Post: 02-05-2019, 12:03 AM
  2. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  3. [SOLVED] Code Clean-Up: Delete "False" worksheet created when "Cancel" is chosen in Input Box
    By Kenny Blackwell in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 08-31-2015, 10:00 AM
  4. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  5. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  6. [SOLVED] Merged cells autofit and "-"/"+" is first character
    By Linky in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-21-2013, 11:27 AM
  7. [SOLVED] How to Count number of "Error" and "OK" after the word "Instrument" found in table row
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2012, 06:26 AM

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