Load pre-selected item, in bold (listview)

GUY08347

Board Regular
Joined
Jul 3, 2006
Messages
87
hi, office 2007
i have a sheet with lots of recordes stored (record is a row in that sheet)
where i put all my data in. so, in one column i have a list of previously selected items that the user selected from a ListView, so it has: Red, Green, Black

i want to make that editable so that when the user wants to change that list of colors, he could load the listview again and have these items already
be in bold,

What i cant figure out is how to get these items be bold from a cell value that has the items listed all in one cell (separated by a comma and spacebar).

i'd have no problem if the items where each in a different cell, BUT here i need the records to be in one row - meaning (among other things), colors are stored in one cell.

Any suggestion will do, and be greatly appreciated!
THANKS.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi,
let me put it in a diffenernt way here:

what i need is this:
breake down a cell value tha contains: Red, Green, Black
into rows, as in:
Red
Green
Black
(each in its own cell)


if this can be done in excel itself, it's fine too. (i just didn't come across something like that in the ecxel functions)
basicaly i want the opossit of the CONCATENATE function in excel, only separate the text string where there is acomma an spacebar

Thanks again!
 
Upvote 0
i figured out a way to do this, with some of excel's functions:
Code:
Sub Breake_Value()
Dim x As Integer, a As String
x = 5
With Sheets("sheet1")
  .Range("d6:d100") = "" 'clear previous extractions
  .Range("D2") = .Range("b4") 'copy string to breake
  .Range("D3") = "=LEN(d2)" 'COUNT STRING
  
more:
 x = x + 1
 
  'prepare to extract string
  .Range("d4") = "=SEARCH("","",D2,1)" 'get next string
  'extract string
  .Range("D5") = "=LEFT(D2,D4-1)"
   a = .Range("D5"): .Range("D" & x) = a

  'remove last extracted string from original string
  .Range("D5") = "=MID(D2,D4+2,d3)"
   a = .Range("d5"): .Range("d2") = a 'fix  resault as number (not as formula resault)

  If .Range("d2") = "" Then Exit Sub 'if more values are to be extract- do another extraction
  GoTo more
  
End With
End Sub

it may not be the most elegant way, but it works!
 
Upvote 0

Forum statistics

Threads
1,224,542
Messages
6,179,424
Members
452,914
Latest member
echoix

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