+ Reply to Thread
Results 1 to 9 of 9

loop thru sheets, find "Plastics", get figure 3 col. to right & label 10 Col righ put i

  1. #1
    Valued Forum Contributor
    Join Date
    11-02-2016
    Location
    NY
    MS-Off Ver
    2010
    Posts
    459

    loop thru sheets, find "Plastics", get figure 3 col. to right & label 10 Col righ put i

    I'm looking for assistance with a Search. The 1st tab is the 'Master' tab and is where I want to put the results of the Search from some 30+ worksheets. I need to pull the adjacent cells 4 columns to the right and 10 Columns to the right of the Search text and place these in the Master Tab. Then loop through the 2nd 3rd etc tab and put all the values in the Master tab. If the search text = "Plastics" in cell Q 30, then I would like to get the amount in cell T30 (4 columns to the right) and the text in cell Z30 (10 columns to the right) of the "Plastics". (I've been able to Loop through worksheets and separately find text, but I haven't been able to put the two together.)
    I couldn't see the attachment, so it may have been uploaded 2 times?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: loop thru sheets, find "Plastics", get figure 3 col. to right & label 10 Col righ put

    Hi

    Is the information always in row 30 since that's not born out by your example?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Valued Forum Contributor
    Join Date
    11-02-2016
    Location
    NY
    MS-Off Ver
    2010
    Posts
    459

    Re: loop thru sheets, find "Plastics", get figure 3 col. to right & label 10 Col righ put

    NO. (Is the information always in row 30 since that's not born out by your example? )
    That is the part that varies from tab to tab. It is also the reason I'm using the SEARCH ("Plastics") to pull info from the adjacent cells. (I had to mock up data without Company info for the ATTACHMENT.)

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: loop thru sheets, find "Plastics", get figure 3 col. to right & label 10 Col righ put

    Assuming the answer to #2 is Yes then first list the sheet names in column A. This macro will do that for you

    Please Login or Register  to view this content.
    Then in B2 copied down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and similarly for C2
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,265

    Re: loop thru sheets, find "Plastics", get figure 3 col. to right & label 10 Col righ put

    Hi queuesef

    Wanna give this a go....
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: loop thru sheets, find "Plastics", get figure 3 col. to right & label 10 Col righ put

    Quote Originally Posted by queuesef View Post
    NO. (Is the information always in row 30 since that's not born out by your example? )
    That is the part that varies from tab to tab. It is also the reason I'm using the SEARCH ("Plastics") to pull info from the adjacent cells. (I had to mock up data without Company info for the ATTACHMENT.)
    Are there multiple instances of 'plastic' on each sheet? This is not clear from your explanation so far since you've only mentioned looping in the context of looping through sheets not in cells withing a sheet.

    This seems to be a much simplified example and probably doesn't represent the size of your actual data. We often find that when we give an answer to what is a trivial non representative example when the solution is used with the real world data it doesn't work because of factors like string length and other stuff which is important but hasn't been mentioned.

    Therefore upload your real workbook (or at least a cut down copy), anonymised if necessary and manually add the results you expect to see. Clearly identify which is original data and which are the results and in a note clearly explain how you have arrived at your results.

  7. #7
    Valued Forum Contributor
    Join Date
    11-02-2016
    Location
    NY
    MS-Off Ver
    2010
    Posts
    459

    Re: loop thru sheets, find "Plastics", get figure 3 col. to right & label 10 Col righ put

    Sintek Nailed it. I'm having issues relating to the " If Not rng is Nothing then". I'm not accustomed to using or seeing, but I know it's taking the Negative of rng.
    If the info was always in Row 30, then I would have liked Richard Buttrey's answer. Thank you so much both. Any other pointers for newbie? I try to build a framework (like a flow chart to help but I'm not so confident with all the different vba codes. I do know practice will definitely help.

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,265

    Re: loop thru sheets, find "Plastics", get figure 3 col. to right & label 10 Col righ put

    Glad i could help...Good luck. thanks for rep +

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: loop thru sheets, find "Plastics", get figure 3 col. to right & label 10 Col righ put

    Quote Originally Posted by queuesef View Post
    Sintek Nailed it. I'm having issues relating to the " If Not rng is Nothing then". I'm not accustomed to using or seeing, but I know it's taking the Negative of rng.
    If the info was always in Row 30, then I would have liked Richard Buttrey's answer. Thank you so much both. Any other pointers for newbie? I try to build a framework (like a flow chart to help but I'm not so confident with all the different vba codes. I do know practice will definitely help.
    Purely for info the Indirect functions I gave were NOT specific to row 30 They find the row where 'Plastic' exists wherever that may be.

+ 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. [SOLVED] Selecting multiple sheets for a "assign-label-code"
    By jakobharms in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-13-2014, 05:49 AM
  2. [SOLVED] Selecting multiple sheets for a "assign-label-code"
    By jakobharms in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-23-2014, 05:52 AM
  3. [SOLVED] HELP - Based on "C" cell entry, Find mismatch figure in row. And save/show separately
    By ExcelUser2707 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-07-2014, 04:23 AM
  4. Replies: 2
    Last Post: 06-06-2013, 12:45 PM
  5. Replies: 5
    Last Post: 06-26-2006, 09:23 PM
  6. [SOLVED] scatter plots and "label" as ("X" value1, value2)
    By shabnam in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-11-2005, 10:06 AM
  7. LOOP BETWEEN "FRONT" AND "END" SHEETS?
    By ewan7279 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-17-2005, 12:06 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