+ Reply to Thread
Results 1 to 9 of 9

Macro file to search CSV and then re save

  1. #1
    Registered User
    Join Date
    10-29-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    14

    Macro file to search CSV and then re save

    Hello,

    Not sure if this is even do-able but worth asking as it would make my life a lot easier....

    I have a program that sends out questionnaires (for staff appraisals) Users fill in their answers and then submit the form.

    I then download the submitted answers in csv format. Once it is downloaded I need to find one specific person from the list and move them to the top row then save the file as an excel spreadhsheet.

    At the moment I am doing this manually. Can anyone think of a way to run something so I basically select the file I want to run it on then type in the name of the person to move and it moves it and saves the file as an .xls?

    Any ideas?

    Cheers guys
    Last edited by Michael!; 11-03-2010 at 05:47 AM.

  2. #2
    Registered User
    Join Date
    10-29-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Batch file to search CSV

    I think I have actually done most of this with a macro but I want to have the search box come up each time! At the moment the macro is recorded with the word test as what it searches for.

    Is there a way to prompt for it to ask what to search for?

  3. #3
    Registered User
    Join Date
    10-29-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Batch file to search CSV

    p.s here is the Macro:

    Please Login or Register  to view this content.
    Last edited by Michael!; 11-03-2010 at 08:58 AM.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro file to search CSV and then re save

    Try this:
    Please Login or Register  to view this content.

    You should edit the post above and change those [QUOTE] tags to [CODE] tags.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    10-29-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro file to search CSV and then re save

    [QUOTE=JBeaucaire;2411686]Try this:
    Please Login or Register  to view this content.

    You should edit the post above and change those
    tags to [CODE] tags.
    That's the exact find of thing I am after

    Although it is deleting the row rather than moving it to the location and I cannot work out which bit of the code is doing that?

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro file to search CSV and then re save

    It's copying the cells with data in them on that row to cell AX3, look over in AX3.

    Using words, can you describe what it's supposed to a little more clearly? Or post a sample worksheet with a BEFORE/AFTER example?

  7. #7
    Registered User
    Join Date
    10-29-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro file to search CSV and then re save

    Quote Originally Posted by JBeaucaire View Post
    It's copying the cells with data in them on that row to cell AX3, look over in AX3.

    Using words, can you describe what it's supposed to a little more clearly? Or post a sample worksheet with a BEFORE/AFTER example?
    I know its been a while but this ahs cropped up again I will try and explain in the easiest of bullet points

    Open Spreadshet
    There will be about 6 rows of data each of which is assigned to a specific person

    I will have a specific person from that 6

    I need to move the row that specific person is on to the top of the list

    File then needs to be saved as an .xls

    The person is different each time so I will need to be prompted each time on who/what to search for.

    I have attached a spreadsheet you can see John Smith in the middle of the list before then at the top of the list after.

    Thanks for the help
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    10-29-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Macro file to search CSV and then re save

    Any help at all on this?

  9. #9
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Macro file to search CSV and then re save

    I dont think the tread title matches your question anymore.
    See the attachment.
    Enter an 'a' in column G adjacent to the person you want to be 'promoted'., Enter



+ 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