+ Reply to Thread
Results 1 to 8 of 8

automatically copying rows to an existing spreadsheet based on criteria

  1. #1
    Registered User
    Join Date
    01-29-2013
    Location
    Grapevine, Texas
    MS-Off Ver
    Excel 2007
    Posts
    10

    automatically copying rows to an existing spreadsheet based on criteria

    I have an excel spread sheet that I would like to automatically copy rows based on Status (which is a column header with a drop down list) (No Show, No ROF, Converted, Declined Care, Money Issue) on my NPI tab. I will be adding to this spread sheet daily so the data range needs to be large.

    I do have macros on the first sheet that inputs patients i Enter in (in Forms) to NPI (sheet) I would like that to stay the way it is if possible.

    I have the spread sheet set up to where I would like the rows to be duplicated so I can see what a patients status are group by common status. I would like all of the patients to stay in NPI and not be deleted once copied to another sheet.

    2nd I would also Like to group the NPI based on Event Type (massage, Lunch & Learn, Dinner Workshop, Health Fair) I have the tabs in place. I would just like the same thing from above. The patients to be added to one of the Event Type sheets based on which category the fall under .

    I have been struggling with this for ever and about to give up.. If someone could please help me it would be a lifesaver!!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: automatically copying rows to an existing spreadsheet based on criteria

    try the tranfer button in NPI tab it will tranfer to both conditions
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    01-29-2013
    Location
    Grapevine, Texas
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: automatically copying rows to an existing spreadsheet based on criteria

    I think that you are right on track but when I open it in excel it gives me a security warning - Macros have been disabled and then options. I clicked on options and clicked enable this content. But when I do the Transfer button doesnt work. I am probably doing something wrong on my end can you please explain more...

    Also it looks like it duplicates the already existing patients if you click it more than once.. is it possible for it not to duplicate the patient just update and add the ones that arent in that sheet?

    Again thank you soooo much for your help you are truly a life saver!

    Johanna

  4. #4
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: automatically copying rows to an existing spreadsheet based on criteria

    I was my mistake since while I was trying out the macro, I did not erase the data on the output tabs... I only erased the posting mark to try it out..
    The posting mark in column 10 prevents duplication.

    Would'nt it be more efficient if the button done in tab form did this?

  5. #5
    Registered User
    Join Date
    01-29-2013
    Location
    Grapevine, Texas
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: automatically copying rows to an existing spreadsheet based on criteria

    I am brand new to all of this so I am very open to suggestions or whatever you think will work the best! Thanks again for all your help. I really really appreciate it!

  6. #6
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: automatically copying rows to an existing spreadsheet based on criteria

    there you go, the DONE button transfers to NPI and the other tabs too. I left the transfer button in case there are old records to be transfered
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-29-2013
    Location
    Grapevine, Texas
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: automatically copying rows to an existing spreadsheet based on criteria

    Im so sorry to do this to you when i click the done button it gives me an error Runtime error 9 script out of range

    when i click debug it highlights this ---> rsh = Sheets(st).Range("A" & Rows.Count).End(xlUp).Row + 1

    any suggestions

  8. #8
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: automatically copying rows to an existing spreadsheet based on criteria

    it might mean that a tab is not there. Make sure that the all corresponding tabs are there (check spelling too)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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