Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Read from a delimiter cell, search and update the values

0

I have a cell which has values delimited by a pipe - A|B. I have a task to read A & then search in another sheet for all the various rows & columns that has a value against this A. Once done, repeat the same for B & so on.

Steps i need to follow are:

1. Read first value from the cell having multiple values delimited by a |.

2. A different sheet has this value in one column at multiple places. Against this value in one column there are other values in multiple rows & columns.

3. I need to capture all these values & populate into a cell with a delimiter of |.

4. Same repeat for all the values in the cell in point 1.

Can all this come in one big formula - (embedded by formulaes)?

Thanks!

Answer
Discuss

Answers

0

We teach Excel. We don't do homework. That's our limitation on this site.

Your question is whether all you describe can be done with one formula containing many functions. I will help you find the answer.

Toward that end please imagine the presentation of the result. First observation is that the result can't be in a single cell. That is because you don't state its format. If the result is a concatenation of delimited values like the original cell, then it could be in a single cell. But you have multiple results from each of multiple search criteria. Therefore you would need to use delimits within delimits - something like this: a,b,c,d|f,a|b,c,e,f|c, where both bars and commas are used as delimiters. So, yes, you could get the entire result into a single cell but the question is who could read that concoction. For human consumption it would hardly be suitable.

But why is it important to have the entire result in one cell? That is because the way Excel works: A cell contains a formula and displays its result. One formula = One result.

That is, unless it's an array formula. Excel is enormously powerful and I wouldnt like to bet against it. Therefore I will answer a slightly different question to the one you asked. Could I create such a formula? The answer is and emphatic no. I couldn't and I wouldn't. I would use VBA.

Discuss


Answer the Question

You must create an account to use the forum. Create an Account or Login