Results 1 to 2 of 2

Thread: Save the splited file along with some text refered in cell a3

  1. #1

    Save the splited file along with some text refered in cell a3



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Dear ExpertI have vba to split the col values as new work save into target folder...I want add some text values along with file name.. as of code procedure it save as per col values but i want save with added text like ,for e.g LVT,MCS,VTR This is usually but i expect like belowLVT- MIS Reports from 1st Apr' 2015 to 30th Apr'2015 for Tronto Location. MCS- MIS Reports from 1st Apr' 2015 to 30th Apr'2015 for Tronto Location. VTR - MIS Reports from 1st Apr' 2015 to 30th Apr'2015 for Tronto Location. find the attachment code inserted in module
    Attached Files Attached Files

  2. #2
    Acolyte jaslake's Avatar
    Join Date
    Aug 2011
    Location
    mineral city oh usa
    Posts
    81
    Articles
    0
    Excel Version
    2007;2010;MAc2011
    Hi manilara

    If I understand

    Add this Dim Statement
    Code:
    Dim FileNameExt  As String
    Add the indicated Line of Code
    Code:
    With wsSource
          FileNameExt = Sheets("Sheet1").Range("A3").Value  '<---Add this line of Code
          Lastrow = .Range("f" & Rows.Count).End(xlUp).Row
          .Range("f1:f" & Lastrow).AdvancedFilter Action:=xlFilterInPlace, Unique:=True
          Set Agents = .Range("f2:f" & Lastrow).SpecialCells(xlCellTypeVisible)
          If .FilterMode Then .ShowAllData
          .Copy
    End With
    Change this Line of Code
    Code:
    AgentFilename = Agent.Value & " " & FileNameExt & ".xlsb"  '<----change this Line of Code
    John

Tags for this Thread

Posting Permissions

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