+ Reply to Thread
Results 1 to 4 of 4

Pull the information of a searched cell up as well

  1. #1
    Registered User
    Join Date
    08-17-2012
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    82

    Pull the information of a searched cell up as well

    Hello guys,

    I am recent at the forum, therefore please forgive me if I have skipped something I shouldn't.

    I am doing a macro that searches a certain text and then selects that cell as well as the rest of the column (from that text cell to the end) and pulls it to the cell before.

    Example:
    Searched Text: Fe.contab.

    Text Position: Uncertain (Not fixed)
    Last Cell of that Column: Uncertain (Not fixed)

    P.S: Each file has a different amount of rows. it can be 30 or it can be 1584..So that's why it's Uncertain (Not fixed)


    Let's pretend the searched text is at cell A317 (like the attached file I placed). What i want is that the information from that cell untill the end of column be one cell up, which means that it will start not on A317 but on A316.


    The code i have come up untill now is the following

    Please Login or Register  to view this content.
    I believe the problem is at:

    Determining the cell it starts and where it stops
    Please Login or Register  to view this content.
    and at:

    Determining the cell where it should be placed
    Please Login or Register  to view this content.

    I hope you did understand what i meant with the code i'm building and I'm looking forward for a reply.
    Thank you guys.


    Kind Regards,
    FCarv
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Pull the information of a searched cell up as well

    Please Login or Register  to view this content.
    Last edited by patel45; 08-17-2012 at 09:56 AM.

  3. #3
    Registered User
    Join Date
    08-17-2012
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    82

    Re: Pull the information of a searched cell up as well

    Hello patel45,

    Thank you for your prompt feedback.

    Your code is far more complex of what i'm used to
    The part you did not understand was probably the part where I was trying to set it to paste into the Cell before where it was.

    Example: Was at A317 and I need to to paste to the A316, but has the little problem of being uncertain.

    Nevertheless the first part of the code is running perfectly. It selected what I wanted to, and cut it. Now I only need to paste into that cell I said to you above in the example.
    Last edited by FCarv; 08-17-2012 at 10:30 AM.

  4. #4
    Registered User
    Join Date
    08-17-2012
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    82

    Re: Pull the information of a searched cell up as well

    Ok, sorry about the double post but I managed to build the rest of the code

    Therefore the final code will be the following:

    Please Login or Register  to view this content.
    I forgot about the offset option that would do just what I wanted to.
    I will put the thread as SOLVED.

    patel45, thank you so much again. I think I gave you a like(at star) but i'm not sure


    Kind Regards,
    FCarv

+ 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