I was working on a list for a list box, which drives me nuts, till I found a very simple solution, just using 'notepad' and 'excel'!
Just wanted to share it with anyone who would like to use it. This procedure can be used for many types of coding and building lists.
The problem:I had a list that goes like this given below. It is a list of supported LG mobile phones which I need to code for a list box:
LG-B2050
LG-BL40-Orange
LG-C1100
LG-C3300
LG-C3310
LG-C3320
LG-F2250
LG-GB220
LG-GC900
LG-GC900-orange
LG-GD900 Obigo
LG-GT500-v10b Browser
LG-GT505-Orange
LG-GW300
LG-GW300-Orange
LG-GW520
LG-GW520 Teleca
LG-GW520-orange
LG-KC550 Teleca
LG-KC780 Teleca
LG-KC910
Now the code for the list box that I need goes like this - <option> LG-B2050</option> and so on. My first option was to copy <option> and paste it before each model and </option> after. Doing it manually just get me nuts more so since I have a much much lengthier list than the eg. above. So I decided I had to find a more 'auto' way using simple tools that I have on my pc.
The method:Copy the whole list and paste it on a 'notepad'. Now press Ctrl H or Edit-Replace. Replace all LG with </option><option>LG. Now it looks like this:
</option><option>LG-B2050
</option><option>LG-BL40-Orange
</option><option>LG-C1100
</option><option>LG-C3300
</option><option>LG-C3310
</option><option>LG-C3320
</option><option>LG-F2250
</option><option>LG-GB220
</option><option>LG-GC900
</option><option>LG-GC900-orange
</option><option>LG-GD900 Obigo
</option><option>LG-GT500-v10b Browser
</option><option>LG-GT505-Orange
</option><option>LG-GW300
</option><option>LG-GW300-Orange
</option><option>LG-GW520
</option><option>LG-GW520 Teleca
</option><option>LG-GW520-orange
</option><option>LG-KC550 Teleca
</option><option>LG-KC780 Teleca
</option><option>LG-KC910
Copy the first </option> at the beginning to the last part. Now delete the line breaks and you got the completed code:
<option>LG-B2050</option><option>LG-BL40-Orange</option><option>LG-C1100</option><option>LG-C3300</option><option>LG-C3310</option><option>LG-C3320</option><option>LG-F2250</option><option>LG-GB220</option><option>LG-GC900</option><option>LG-GC900-orange</option><option>LG-GD900 Obigo</option><option>LG-GT500-v10b Browser</option><option>LG-GT505-Orange</option><option>LG-GW300</option><option>LG-GW300-Orange</option><option>LG-GW520</option><option>LG-GW520 Teleca</option><option>LG-GW520-orange</option><option>LG-KC550 Teleca</option><option>LG-KC780 Teleca</option><option>LG-KC910</option>
Now in another list I had no common strings like 'LG' used above. It goes like below:
5300
6233
6300
N70
N80
1680c-2
2330c-2
2600c
2600c-2
2610
2630
2680s
2680s-2
2730c-1
2760
3100
3109c
3110c
3120
In this case, first paste the list to a new excel file. Insert a column on the left. fill the left column with '1' or whatever by dragging the bottom right corner '+' sign to fill upto your list. Now copy both the column to notepad and replace all '1' with </option><option> and follow the same method as above. That's it.
This has saved me lots of time. And the method can be used for many different situations when working with lists or databases. I certainly found it useful. Hope someone will find it useful too. If anyone wants to see the result in action -
Mobile Poker.