+ Reply to Thread
Results 1 to 5 of 5

Move Data and Create Headers

  1. #1
    Registered User
    Join Date
    10-21-2011
    Location
    baltimore,md
    MS-Off Ver
    Excel 2003
    Posts
    53

    Smile Move Data and Create Headers

    Hello All,

    I was hoping someone could help me with this programming. I've been trying to tackle it for quite a while for my internship, but haven't had much luck.

    In column B of the data sheet are Patient ID #. There are two other worksheets in the workbook, contingency and prescription. The first task was to move the data(Columns O and S specifically) for patients whose column E read main study correspondingly. This data would move into Worksheet ("Prescription") if Column G read 0 or Worksheet ("Contingency") if column G read 1. The code for that is below.

    Please Login or Register  to view this content.

    Now however a new component has been added in which I need some help with. Column B has patient IDs. Using the same criteria as above(0=prescription, 1=contingency) I need the program to take every DIFFERENT patient ID and create headers in the corresponding worksheet with the corresponding data beneath. So for example, there will be ONE header reading DL1042 tottimingtyping(column O data) and all the data corresponding to DL1042 in column O will be in the new worksheet (prescription in this case since column g is 0) it will then do a header reading DL1042 tottimingkeypad(column S data) and the same for this. It will then create headers for the next patient CB1048 and do the same thing, and so on till each patient in column b has their own header in the correct place in the other worksheets.

    Any help would be greatly appreciated, I am completely stuck and my internship relies on this task!

    Bests,

    V
    Last edited by ConneXionLost; 11-29-2011 at 12:14 AM. Reason: Added code tags

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Move Data and Create Headers

    Can you attach a sample file and what the outcome looks like?

  3. #3
    Registered User
    Join Date
    10-21-2011
    Location
    baltimore,md
    MS-Off Ver
    Excel 2003
    Posts
    53

    Re: Move Data and Create Headers

    please find attached the main data sheet and what the data should look like after the program is run. i have some comments on the headers on the what the program should look like workbook in the worksheet prescription and contingency.

    THANK YOU SO MUCH.

    -v
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    10-21-2011
    Location
    baltimore,md
    MS-Off Ver
    Excel 2003
    Posts
    53

    Re: Move Data and Create Headers

    anyone know how to figure this one out?

  5. #5
    Registered User
    Join Date
    10-21-2011
    Location
    baltimore,md
    MS-Off Ver
    Excel 2003
    Posts
    53

    Re: Move Data and Create Headers

    hey anyone good enough to figure this one out?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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