+ Reply to Thread
Results 1 to 2 of 2

Macro to split based on condition

Hybrid View

  1. #1
    Registered User
    Join Date
    10-15-2011
    Location
    bangalore
    MS-Off Ver
    Excel 2010
    Posts
    99

    Macro to split based on condition

    HI ALL,

    I am doing repetative on a daily basis . i ma looking for a macro for teh same .


    I have a spread sheet with A to G filled with data , now i ahve assighn the work to users

    for example

    i have 1000 rows of work i am alloting to diffrent users , depending on their capability.

    if pop up can come out and ask me for for every single user i will allot the line items , so that it copies the line items and put it in a seprate file , with the user name.

    the user name can be taken form a file called username in A colomun.


    can anybody help me on this


    thanks in advance.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro to split based on condition

    Does this help?

    Sub somusas()
    Dim x As String
    Dim ws As Worksheet
    Application.ScreenUpdating = False
    Sheets("username").Activate
    Set ws = ActiveSheet
    x = InputBox("Please Enter the UserName")
    Sheets.Add.Name = x
    ws.Activate
    Range("A1:A" & ActiveSheet.UsedRange.Rows.count + 1).AutoFilter 1, x
    Range("A2:A" & ActiveSheet.UsedRange.Rows.count + 1).SpecialCells(xlCellTypeVisible).EntireRow.Copy Sheets(x).Range("A" & Rows.count).End(3)(2)
    Sheets(x).Rows("1:1").Value = ws.Rows("1:1").Value
    ws.AutoFilterMode = False
    Application.ScreenUpdating = True
    End Sub

+ 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. split text files stored in some location to multiple files based on a condition
    By GIRISH_KH in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-01-2013, 11:32 AM
  2. [SOLVED] VBA Macro - Autofill (split a value based on hours)
    By macenmin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-03-2013, 05:08 AM
  3. [SOLVED] Need macro to split one column into multiple columns based on _ and spacing
    By snely in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 09-17-2012, 10:05 AM
  4. Select worksheet based on condition & populate cell based on condition
    By beth1069 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-19-2011, 01:27 PM
  5. Replies: 3
    Last Post: 07-23-2006, 06:20 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