Text formatting by Vlookup

March 29, 2017 at 08:03:46
Specs: Windows 7
Hello DerbyDad... Hope you're well..

I'm actually looking for the formatting of text by applying vlookup function. I'm successfully done a vlookup from the source cell to target cell but unable to do the formatting.

Example

Source Data

Col A Col B
Question 1 Bank of Baroda ('baroda' in red colour)
Question 2 Bank of America ('of' in red colour)


Target Data
Col A ? (need to get same with text color)
Question 1
Question 2



See More: Text formatting by Vlookup

Report •

#1
March 30, 2017 at 06:02:03
First, a posting tip:

Please click on the blue line at the end of this post and read the instructions on how to format example data so that it is easier for us to read. Then edit/repost your data so that the columns line up correctly. Don't forget to use Column letters and Row numbers as shown in the example.

Second, I don't quite understand your request.

Col A ? (need to get same with text color)

What needs to be the same the text color? The entire cell? Individual characters within the cell? Something else?

How does the Target Data text "Question 1" (and 2) relate to the Source data text "Question 1" (and 2)? I can't tell what is a question, an answer, the result of a formula, etc.

How did the source words "Baroda" and "of" become formatted as red?

Keep in mind that we can't see your workbook from where we are sitting nor do we know your process, so you need to be very clear in your explanation.

Finally, there is no function in Excel that will allow you to format (or retain the formatting of) a cell or the contents of a cell. AFAIK, you have 3 options for formatting the cell or contents thereof:

1 - Manually
2 - Conditional Formatting
3 - VBA (a macro)

Since it sounds like you want to format only certain characters in the cells, we can eliminate Conditional Formatting. As far as using a macro, we will need a lot more details before we could offer any suggestions.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •

#2
April 1, 2017 at 20:56:38

Apologize for the delay in response DerbyDad. I have highlighted my points below.

Second, I don't quite understand your request.

Col A ? (need to get same with text color)
What needs to be the same the text color? The entire cell? Individual characters within the cell? Something else?
DerbyDad – It’s individual characters/word within the cell

How does the Target Data text "Question 1" (and 2) relate to the Source data text "Question 1" (and 2)? I can't tell what is a question, an answer, the result of a formula, etc.
How did the source words "Baroda" and "of" become formatted as red? – Yes, in the target data, in cell “Bank of Baroda” - Bank and of are red color
Keep in mind that we can't see your workbook from where we are sitting nor do we know your process, so you need to be very clear in your explanation.
Finally, there is no function in Excel that will allow you to format (or retain the formatting of) a cell or the contents of a cell. AFAIK, you have 3 options for formatting the cell or contents thereof:
1 - Manually
2 - Conditional Formatting
3 - VBA (a macro) – I am requesting a VBA Macro.
Since it sounds like you want to format only certain characters in the cells, we can eliminate Conditional Formatting. As far as using a macro, we will need a lot more details before we could offer any suggestions. – I am happy to share any details which require 😊


Report •
Related Solutions


Ask Question