Forum Discussion
Need help with copy values in comma seperated data into another column conditionally
- Nov 24, 2021
Open your 'real' workbook and my sample workbook.
Press Alt+F11 to activate the Visual Basic Editor.
Look at the Project Explorer pane on the left hand side.
If necessary expand my sample workbook and then Modules under it.
You should see Module1:
Drag Module1 to your real workbook. This will copy the module, making the function available in your workbook.
You can view the code by double-clicking Module1.
You can't imagine how much you made me happy. Don't how to say thank you 🙂
One thing I didn't understand here. How can I use this function with 20.000 rows of data in the same format? Can you explain to me like I'm five, please?
What I mean by that, they will ask me how they can use this function on their own. İnstead of just answer, I'm trying to understand this approach.
Huge thanks.
Yes, it will work on a large data set too.
Enter the formula
=IF(ISNUMBER(FIND("True",A2)),"Opt In","")
in B2 and
=SelItems(A2,D2)
in C2. then select B2:C20000 (i.e. to the last used row) and press Ctrl+D to fill down.
- MecekaNov 24, 2021Copper Contributor
HansVogelaar I get this error with second function.
- HansVogelaarNov 24, 2021MVP
Do you use comma as decimal separator? If so, you must use semicolon between the arguments of the formula:
=SelItems(A2;D2)
- MecekaNov 24, 2021Copper Contributor
HansVogelaar I've tried maybe tens of various ways to make it work. I'm missing something here I guess.
I want to mention something. The first file you attached as an answer both functions working properly. But this is just sample file. My target is to take this function and paste the original one to make it work. As you said the file includes VBA function that's why it worked actually. The thing makes me confusing is how did you write this function? İf I can reach it, then maybe I can write a VBA function for the original one as well. I'm talking as a beginner. Correct me please if I'm wrong.