How to extract text of some color from single cell?

roberto.delagarza

New Member
Joined
May 21, 2012
Messages
2
I need to extract some text from singe cells wich has been marked with another color, let's say red. Do you have a simple vba macro subroutine which can extract the text and write it in another cell? I will apply this sobroutine in the entire database field. Sometimes the text is contiguos in the cell, sometimes it isn't. Thanks !!
 
Thank you for your time Rick !

Ok so what I am trying to do is come up with a summary tab that is extracting data into a list of items (Example 1). I just hand typed this one to show what I am looking for. One column for each week will be the purple data and the other column will be the green data. The cells that I am wanting to extract the data from is on another tab where those cells have long strings of text that have different colors (Example 2). I was not getting a clean list with all of the data in one cell if that cell have two sets of data the same color so I tried breaking the data up into multiple columns as you can see on row 2 and row 3 in (Example 2). If that is what I need to do to make this work that is fine. Now when using your VBA code I am getting the purple data just fine because that is the RGB color that I am asking for in the coding (Example 3). And I am being able to get my list by using INDIRECT function which is fine also if that is how I must do it to get it how I want. But my issue is the other sets of text in say green I am needing to extract them also like the purple so I can put them in their own list. I was trying this with the ElseIf added to your VBA code but it is not working of course. I am very new to VBA so forgive me I am trying to learn as I go. Maybe I am going about this completely wrong or maybe not. Thank you again for taking a look.

Example 1
Weeks List Want.JPG


Example 2
Data to Extract.JPG


Example 3

Extracted Data.JPG


Example 4 (E2 is what is happening when I don't break up the data into different columns when there are sets of the same color)
Weeks List with Indirect formula.JPG
 
Upvote 0

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,223,244
Messages
6,170,976
Members
452,372
Latest member
Natalie18

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top