I have limited experience with vba. I know how to create variables and print out a few things, but what I am looking to do is slightly more complicated than that. I was able to create an excel formula that looks at a list and returns the value for a corresponding row, column by using the index and small functions. I used these two web pages for help:
Vlookup Multiple Values - Return MULTIPLE corresponding values for ONE Lookup Value
https://www.youtube.com/watch?v=wclmIcTsbtg
This is the formula I created:
=IF($P13="Other",INDEX($F$13:$P$2262,SMALL(IF($F$13:$F$2262=$Q13,ROW($F$13:$F$2262)-12),COLUMNS($S13:S13)),5),
FALSE)
I can drag this formula across columns and end up with a complete list of all the Others I need. The total number of items that match F:F to Q are not always the same. Sometimes there is 1 instance its true, sometimes there is 5 times, in theory it could be as many as possible. Lastly, I have a Concatenate formula that takes all this data and sticks it together into one cell.
I was wondering if its possible to create a macro that runs the formula in a loop for the number of times F:F is Q, then posts those values into ONE cell with a comma separator. If anybody can do this, that would be awesome. If this doesn't make sense I will try to explain it as best as I can. Here is an example of what I would like though: This is not my actual data, but everything passed through is a String. The List of Managers is what I would like.
<tbody>
</tbody>
Vlookup Multiple Values - Return MULTIPLE corresponding values for ONE Lookup Value
https://www.youtube.com/watch?v=wclmIcTsbtg
This is the formula I created:
=IF($P13="Other",INDEX($F$13:$P$2262,SMALL(IF($F$13:$F$2262=$Q13,ROW($F$13:$F$2262)-12),COLUMNS($S13:S13)),5),
FALSE)
I can drag this formula across columns and end up with a complete list of all the Others I need. The total number of items that match F:F to Q are not always the same. Sometimes there is 1 instance its true, sometimes there is 5 times, in theory it could be as many as possible. Lastly, I have a Concatenate formula that takes all this data and sticks it together into one cell.
I was wondering if its possible to create a macro that runs the formula in a loop for the number of times F:F is Q, then posts those values into ONE cell with a comma separator. If anybody can do this, that would be awesome. If this doesn't make sense I will try to explain it as best as I can. Here is an example of what I would like though: This is not my actual data, but everything passed through is a String. The List of Managers is what I would like.
Company | Manager | Manager Redefine | List of Managers |
A | Tim | Tim | False |
A | Omega | Other | Omega |
B | Bill | Bill | False |
B | Phi | Other | Phi, Zeta |
B | Zeta | Other | Phi, Zeta |
<tbody>
</tbody>