+ Reply to Thread
Results 1 to 12 of 12

Find Text and copy adjacent cells

  1. #1
    Registered User
    Join Date
    04-11-2012
    Location
    Bundaberg, Australia
    MS-Off Ver
    Excel 2010
    Posts
    30

    Find Text and copy adjacent cells

    Hi everybody,

    I'm trying to work out a macro to find text with in a cell in this case "Main Crop" and copy the cell to the right and the cell to the left into 2 different cells of a newly opened spreadsheet.
    Along with finding 3 other cells with text in them to the spreadsheet as well.

    Much thanks in advance for any help.

    Chris.

  2. #2
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Find Text and copy adjacent cells

    Hi..

    Can you attach a sample Workbook showing the column with the text that you need to search through to find the string "Main Crop"..

    Along with finding 3 other cells with text in them to the spreadsheet as well.
    What do you mean by this..? Do you need to also search through the cells in the column and do the same if it finds any of the 3 other strings?.. if so.. what are these other strings you need to search for?

  3. #3
    Registered User
    Join Date
    04-11-2012
    Location
    Bundaberg, Australia
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Find Text and copy adjacent cells

    Apo,

    The Main Crop info is in different cells in the E Column. I'd also like it to put the Crop in the row (i.e Cell E10) in column a, then the area to the left of the main crop in column b, then the total plants to the right of the Main Crop in column c and then Harvest Delivery total (i.e Cell F36)in column d. The main problem I can think of is that I need these cells for each different crop and the information varies the cells for each crop. The attached file is only a base sample and the actual spreadsheet can be more than 3000 rows of info. I need it to filter out all crops with these fields so I can then do calculations on each row.

    Cheers,
    Chris.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Find Text and copy adjacent cells

    k.. the requirements are clear.. I'll see what i can come up with..

  5. #5
    Registered User
    Join Date
    04-11-2012
    Location
    Bundaberg, Australia
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Find Text and copy adjacent cells

    Thanks Apo can't wait to hear from you.

  6. #6
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Find Text and copy adjacent cells

    Hi..

    Here's one way to do it.. string a few Find Next functions together and output values using Offset to sheet2. Then create a new Workbook and copy sheet2 to new workbook and rename the new Workbook and the sheet the data was copied to..

    Click the "Go!" button in the attached Workbook...

    Please Login or Register  to view this content.
    I didn't get a Harvest Delivery value for:
    Chilis : P9 Jalapeno (B 0.31 Ha) 0.31 30000

    As in the sample you provided .. it did not exist...
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-11-2012
    Location
    Bundaberg, Australia
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Find Text and copy adjacent cells

    Thanks Apo just what I wanted works perfectly.

  8. #8
    Registered User
    Join Date
    04-11-2012
    Location
    Bundaberg, Australia
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Find Text and copy adjacent cells

    Hey everybody,

    Still having a few problems with this as after Apo's thing runs I'm trying to add 2 columns 1 titled "Plants" and the other titled "Grams Per Plant".

    In the plant column I need to put a formula =Total Plants * Area and in the Grams per plant column I need =Harvest Delivery*1000/Plants each column needs to be copied down to the end of the column.

    Any help would be greatly appreciated.
    Last edited by wdwinterfang; 10-18-2013 at 12:20 AM.

  9. #9
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Find Text and copy adjacent cells

    I think this is what you want?

    See attachment..
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    04-11-2012
    Location
    Bundaberg, Australia
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Find Text and copy adjacent cells

    Apo, Thanks again mate. Just needed to reverse the first formula and worked perfectly. You are a legend.

  11. #11
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Find Text and copy adjacent cells

    No worries.. maybe next time i get up there we have a Bundy..

  12. #12
    Registered User
    Join Date
    04-11-2012
    Location
    Bundaberg, Australia
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Find Text and copy adjacent cells

    Anytime your up here mate just send us a message.

+ 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. Replies: 2
    Last Post: 09-07-2013, 07:50 PM
  2. Replies: 7
    Last Post: 12-04-2012, 06:23 AM
  3. [SOLVED] Help writing a macro to find text and copy values to adjacent cells
    By Nnnnnnnick in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-24-2012, 10:07 AM
  4. Find and copy cells and adjacent cells
    By RM007 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-08-2011, 12:44 AM
  5. Replies: 4
    Last Post: 05-12-2011, 04:37 PM

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