+ Reply to Thread
Results 1 to 13 of 13

Using Multiple Variables to Return Multiple Variables

  1. #1
    Registered User
    Join Date
    03-26-2017
    Location
    Chicago, IL.
    MS-Off Ver
    MS Office 2007
    Posts
    9

    Using Multiple Variables to Return Multiple Variables

    Somebody wonderful gave me this cool macro which allowed me to return multiple variables from a single term. It worked flawlessly. In fact I used it on two other projects and had no problems. Naturally that couldn't last. Now, if you look at the Video Links tab, I have a column, J, which contains multiple variables. I want it to pull the concatenated data in column E into a single line of data for each term. If the T1 through T16 designations come along for the ride that's fine. I can use Ctrl+H with the best of them and make them go away. You'll see the macro I attempted to use labeled multiplefind2. Obviously, any and all help is appreciated.

    Thanks.

  2. #2
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,071

    Re: Using Multiple Variables to Return Multiple Variables

    Hi BillMcSciFi,

    This Macro is looping through the values in Column 'J' on the 'Library' worksheet & searching for a match in Column 'A' of that worksheet.

    Can you explain exactly what you want to do step by step & ensure you add what worksheet you're referring to when you refer to Columns.

    Cheers
    Remember you are unique, like everyone else

  3. #3
    Registered User
    Join Date
    03-26-2017
    Location
    Chicago, IL.
    MS-Off Ver
    MS Office 2007
    Posts
    9

    Re: Using Multiple Variables to Return Multiple Variables

    Sure can. Each value in Column J corresponds with corresponds with one in Column E. There are multiple values in Column J. So, for example, J2 should return the example in the attached text file. The links I showed set off every fire wall warning up here so I couldn't pop them in the thread.

    And thanks for the heads up. The other sheets were formatted the same so I never checked the Tab designation.
    Attached Files Attached Files

  4. #4
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,071

    Re: Using Multiple Variables to Return Multiple Variables

    I checked the 'Library' worksheet & the values in Column 'J' don't match the values in Column 'E' except for 'casino'.

    I couldn't see any matches in the other worksheets either?

  5. #5
    Registered User
    Join Date
    03-26-2017
    Location
    Chicago, IL.
    MS-Off Ver
    MS Office 2007
    Posts
    9

    Re: Using Multiple Variables to Return Multiple Variables

    I don't want to match to the terms. I've done that. Now I want to bring up all the video files, Column E, that match the items listed in Column J, T1, T2, T3, etc.

  6. #6
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,071

    Re: Using Multiple Variables to Return Multiple Variables

    I still don't know what you want to do.

    Can you explain exactly what you want to do step by step & ensure you add what worksheet you're referring to when you refer to Columns.

  7. #7
    Registered User
    Join Date
    03-26-2017
    Location
    Chicago, IL.
    MS-Off Ver
    MS Office 2007
    Posts
    9

    Re: Using Multiple Variables to Return Multiple Variables

    Not a problem. I want it to loop through column J on the Video Links tab and find matches in column E in the same tab. Then I want those results returned in a new column. K would be fine.

  8. #8
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,071

    Re: Using Multiple Variables to Return Multiple Variables

    Thanks,

    What's missing is that there are no matches between those columns in your example file.

    Do you mean something like "If Column 'J' contains 'T1' & a Value in Column 'E' starts with 'T1' then copy the value in Column 'E' to Column 'K'?

    This is what I need to help you.

    Cheers

  9. #9
    Registered User
    Join Date
    03-26-2017
    Location
    Chicago, IL.
    MS-Off Ver
    MS Office 2007
    Posts
    9

    Re: Using Multiple Variables to Return Multiple Variables

    If you look at column A you will see rows named T1, T2, etc. Column B has an iFrame script. I concatenated them in E to keep them together. If you look in J you'll see T1, T2, designations for each of the 100 words matched in Column I. I is just for my reference. What I need is the values in J to return matches from E or B, whichever works best. There is a match for every item there.

  10. #10
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,071

    Re: Using Multiple Variables to Return Multiple Variables

    Hi,

    I have your macro working but only where there is only one value to search for in Column 'J' (The Column references are all in the Video Links worksheet)

    I think the macro is supposed to use the single value (eg T1, T15 etc) from Column 'A' or 'C' & searches the string in Column 'E' for that value & pastes the

    matching value into that Row in Column 'K'.

    The macro doesn't use the value in Column 'J' as the combinations don't exist in Column 'E' (What I mean is a value such as 'T1,T16' can't be found in

    Column 'E' for example)

    Also the macro does not 'know' what to do if it finds 2 values, does it paste the value from Column 'E' for the 'T1' or 'T16'?

    If you can explain how you want this to work, I can try to help.

    You also had the macro in a module as well as in the 'Library' worksheet.

    Cheers

  11. #11
    Registered User
    Join Date
    03-26-2017
    Location
    Chicago, IL.
    MS-Off Ver
    MS Office 2007
    Posts
    9

    Re: Using Multiple Variables to Return Multiple Variables

    Okay, we're headed in the right direction. Since I was on a tight time frame I did what I needed manually, but I'm sure I won't be the last to need something like this so I'll leave the thread open. The designations in column J refer to all the uses of the terms in column I to describe the tracks in column A. The T1, etc., designations specify tracks. T1 = track 1 and so on. So for J2, I'd need it to pull back E14 and E17 as results.

    I hope that helps.

  12. #12
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,071

    Re: Using Multiple Variables to Return Multiple Variables

    Thanks that would have been useful earlier & you are still talking too generally to someone who isn't familiar with your data or your purpose.

    Give ONE example of what you need.

    Example; In the 'Video Links' worksheet Cell 'J2' contains 'T1' - For this example explain exactly what you need from step by step.

    Then give the same example for the value in Cell 'J18' where there are multiple values.

    Otherwise, someone else may be able to help.

    All the best.

  13. #13
    Registered User
    Join Date
    03-26-2017
    Location
    Chicago, IL.
    MS-Off Ver
    MS Office 2007
    Posts
    9

    Re: Using Multiple Variables to Return Multiple Variables

    Okay, I'm attaching a sample spreadsheet that will, God willing, avoid any confusion. J2 pulls up two values and J11 pulls up one.So J2 looks for T13 & T16 and then returns them both to column K. J11 is only looking for T7 so it only returns that value to column K. I've eliminated the other sheets since they seem to be making things more confusing than I intended.

    I truly appreciate your time with this. Based on the way my life ebbs and flows I'm pretty sure this will come up again for me.
    Attached Files Attached Files

+ 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] Conditional SUMIF based on multiple columns and multiple row variables
    By jaymaan74 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-15-2016, 11:05 AM
  2. Code To Look In Multiple Sheets Return Value Based On Row and Column Variables
    By ZooTV92 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-30-2015, 01:19 PM
  3. Replies: 1
    Last Post: 07-16-2013, 01:54 AM
  4. Return a vaule based on Multiple variables
    By cooperman82 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-04-2012, 06:50 AM
  5. Variables to multiple cells on multiple sheets
    By BoBoCoDeR in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-06-2012, 05:02 PM
  6. Multiple variables:bunch of variables
    By sbq80 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-19-2009, 04:22 PM
  7. Replies: 9
    Last Post: 02-16-2009, 12:46 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