+ Reply to Thread
Results 1 to 10 of 10

Error rsh = Sheets(st).Range("A" & Rows.Count).End(xlUp).Row + 1

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

    Error rsh = Sheets(st).Range("A" & Rows.Count).End(xlUp).Row + 1

    I am trying to have one sheet in an excel spread sheet (Form) where I input patient data.

    I would like it to send to all information entered to NPI (sheet)

    and From the NPI sheet I would like to be able to update the event type and it to be duplicated to its like sheet. for example if they are from event type massage it needs to go to the massage sheet. in order to track patients and where they are coming from. I would like them to be entered only once in to each sheet that corresponds so if I hit the transfer button or Done button it does not make multiple copies of the same patient

    And From the NPI sheet I would also like to filter Status type. From the NPI sheet I will be inputting the data in this column ( I wont know the status of the patient until they complete there first visit) SO for instance a patient has converted it should be added to the converted sheet.


    Example: of patient on NPI (sheet)

    Name Last Name Event Address City Phone # Email Address Event Type Status
    John Doe Ameritrade 123 red st Roanoke 817-413-1234 [email protected] Massage Converted


    this patient would go in the would stay in NPI but would also be added to the following sheets
    Massage (sheet) and in Converted (sheet)

    I am newer to the macros and I am not really sure what to do at this point if someone could please help me it would really be amazing!

    thank you so much
    JC
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Error rsh = Sheets(st).Range("A" & Rows.Count).End(xlUp).Row + 1

    Your transfer code looks good to me - what are you asking us to do??
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

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

    Re: Error rsh = Sheets(st).Range("A" & Rows.Count).End(xlUp).Row + 1

    I am having trouble with the transfer... when I put the data in to the form sheet and click done it gives me the error code. The data transfers to the NPI sheet even with the error just doesn't transfer past that for some of the sheets... some of them work but not all. I also need to enter more data each day and Im not sure what the data capacity is..

  4. #4
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Error rsh = Sheets(st).Range("A" & Rows.Count).End(xlUp).Row + 1

    Hi Jacolett. Had some time today to try help with this. I can see you have 3 threads about the same, so it was a little hard to find out of what you want.
    But here is what i got. You make the input in the form. It goes to sheet NPI. Without a star in column 10. When you press the button Transfer new, it transfer according to the input in column 8 and 9.
    And add a star in sheet 10 to the transferred. It works fine i think. I have then added a new button, because for some reason, you maybe will delete a customer in Mastersheet NPI, or change the input for some there. And i this case you need to use this button. It delete all sheets (Not NPI) and update them all with all rows and input from Sheet NPI.

    Hope you can use it. I think its ok and fulfill what you want.Have a nice day

    Sincerely

    Abjac
    Attached Files Attached Files

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

    Re: Error rsh = Sheets(st).Range("A" & Rows.Count).End(xlUp).Row + 1

    I really appreciate all your help but when i click transfer or update I get a compile error- cant find file or library so again I have no clue what to do!

    thanks

    Jocatlett

  6. #6
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Error rsh = Sheets(st).Range("A" & Rows.Count).End(xlUp).Row + 1

    HI Jocalett. I checked the file i uploaded here its still working.. Do you use this file or do you try transfer the macro to your own sheet?This file is working the only way you can get an error is if you, try transfer or update and have not put any choice in eventype´or status. If you have not put this in you shall not update before you have these 2 inputs. This will give you a chance to update this after the first visit, which i though you wanted. But if you fill all out the form it dont give any error.
    If you try to put the macroes over to your own sheet, you can maybe have the error.
    So you can choose to use the sheet i uploaded her, or if you want the codes to you own sheet, then upload it here, how it looks exactly. Then i will try to correct it.
    Please answer back how you use the file I uploaded, because if I use the file all is working.
    Also forgot to say if you reneme any of the sheets here it will fail also or delete any, so upload the file how it have to look with the sheet and the correct names.

    Sincerely

    Abjac
    Last edited by abjac; 02-05-2013 at 01:45 PM.

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Error rsh = Sheets(st).Range("A" & Rows.Count).End(xlUp).Row + 1

    You just need to dimension your variables:

    Please Login or Register  to view this content.
    for macro2 etc

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

    Re: Error rsh = Sheets(st).Range("A" & Rows.Count).End(xlUp).Row + 1

    Can you please explain to me step by step how to do that! I am really new to macros

  9. #9
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Error rsh = Sheets(st).Range("A" & Rows.Count).End(xlUp).Row + 1

    Hi Jocatlett,

    I've rewritten some of your code and, as abjac has said, it seems to work well - the main thing I did was dimension the j index in tranfer - that was what was throwing the error:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    It works for Abjac and me - hopefully it will now work for you

  10. #10
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Error rsh = Sheets(st).Range("A" & Rows.Count).End(xlUp).Row + 1

    HI I can only say what xladept say its also working for me. You could upload the real sheet, how it have to look exactly. Then we can have a look and return it so its working.

    Abjac

+ 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