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.
[TABLE="class: grid, width: 50, align: left"]
<tbody>[TR]
[TD]Company[/TD]
[TD]Manager[/TD]
[TD]Manager Redefine[/TD]
[TD]List of Managers[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Tim[/TD]
[TD]Tim[/TD]
[TD]False[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Omega[/TD]
[TD]Other[/TD]
[TD]Omega[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Bill[/TD]
[TD]Bill[/TD]
[TD]False[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Phi[/TD]
[TD]Other[/TD]
[TD]Phi, Zeta[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Zeta[/TD]
[TD]Other[/TD]
[TD]Phi, Zeta[/TD]
[/TR]
</tbody>[/TABLE]
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.
[TABLE="class: grid, width: 50, align: left"]
<tbody>[TR]
[TD]Company[/TD]
[TD]Manager[/TD]
[TD]Manager Redefine[/TD]
[TD]List of Managers[/TD]
[/TR]
[TR]
[TD]A
[/TD]
[TD]Tim[/TD]
[TD]Tim[/TD]
[TD]False[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Omega[/TD]
[TD]Other[/TD]
[TD]Omega[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Bill[/TD]
[TD]Bill[/TD]
[TD]False[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Phi[/TD]
[TD]Other[/TD]
[TD]Phi, Zeta[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Zeta[/TD]
[TD]Other[/TD]
[TD]Phi, Zeta[/TD]
[/TR]
</tbody>[/TABLE]