+ Reply to Thread
Results 1 to 7 of 7

Can someone help with a small macro? Search for Text and copy Text from cells

  1. #1
    Registered User
    Join Date
    11-12-2014
    Location
    Germany
    MS-Off Ver
    Office 2010
    Posts
    7

    Can someone help with a small macro? Search for Text and copy Text from cells

    Hi,

    I am a beginner in using VBA with Excel. I have written some Macros with different functions but now I could use some help....

    What do I want?

    I have two worksheets "overview" and "listing". "listing" is full of information material.

    In the overview sheet are Numbers in column A (i.e. A1 = 10 ; A2 = 12 ....).

    Now my VBA Script has to look into column A and than search for the number it did find there in sheet "listing" (these numbers are always and only in column C in this sheet). If the script finds the number (which is btw unique) the programm has to look 5 cells to the right and copy the text to sheet "overview" into B1.

    Before you guys try to invest a lot of time a small hint on how to realise the function " find the value from A* and go 5 cells to the right in the same row and copy the content" could be enough help.

    Thank you very much!!!

    André

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Can someone help with a small macro? Search for Text and copy Text from cells

    Andre:

    I think a VLOOK-UP formula could be helpful. Could you attach a sample file with your layouts. You can just use some dummy data and explain. To attach a file, click on Go Advanced, scroll down to the Manage Attachments button, browse to the required file, and then push the Upload button.

  3. #3
    Registered User
    Join Date
    11-12-2014
    Location
    Germany
    MS-Off Ver
    Office 2010
    Posts
    7

    Re: Can someone help with a small macro? Search for Text and copy Text from cells

    Hey,

    thank you for your help. I think the easiest way to show what I want is to create a minimal working example because my Excel sheet is full with thousands of datasets with complex calculations.

    I have written down a comment in this document. I hope you get what I mean.

    Thank you very much! I appreciate your help a lot.

    Greetings
    André

    MinimalWorkingExample_001.xlsx

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Can someone help with a small macro? Search for Text and copy Text from cells

    Copy this formula on Sheets overview From C4 to C17 to see if it does what you want.

    =IF(ISNA(VLOOKUP(A4,listings!$A$2:$P$219,16,FALSE)),"",VLOOKUP(A4,listings!$A$2:$P$219,16,FALSE))

  5. #5
    Registered User
    Join Date
    11-12-2014
    Location
    Germany
    MS-Off Ver
    Office 2010
    Posts
    7

    Re: Can someone help with a small macro? Search for Text and copy Text from cells

    Hey,

    I cannot insert this formula. I get en error. Excel says that there is a mistake in this formula and I dont get it.

    Hmmm ...

  6. #6
    Registered User
    Join Date
    11-12-2014
    Location
    Germany
    MS-Off Ver
    Office 2010
    Posts
    7

    Re: Can someone help with a small macro? Search for Text and copy Text from cells

    Ok now I get this.... I am using the german version. I only translated the functions but did forget that the seperators differ from the english version ";" instead of ",".

    Now its working.

    Thank you very much for your nice help!

    André

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Can someone help with a small macro? Search for Text and copy Text from cells

    You're welcome. Glad to help out and thanks for the feedback. Please comply with the Forum Rules and mark this thread as solved.

    http://www.excelforum.com/forum-rule...rum-rules.html

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro to search for text then copy data from that row starting in different column
    By balston2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-09-2013, 10:43 AM
  2. Replies: 1
    Last Post: 11-05-2012, 09:23 PM
  3. Search header row for common text in cells and copy below rows to new sheet
    By drewship in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-19-2011, 02:23 PM
  4. Macro: Search for text from a cell in another sheet and copy it in
    By petesha in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 08-09-2011, 10:34 AM
  5. VBA: Search for text in database in copy cells within target rows
    By heuvel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-18-2009, 10:50 AM

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