LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Select text from a field

after re-readigg, seems like you wanted the bold portion , not the non-bold
part. If so, chnage the False in
If cell.Characters(i, 1).Font.Bold = False Then
to True
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"sebastienm" wrote:

Hi,
The following macro looks at each cell in the selected range and copy the
non-bold text to the next cell on its right. Eg -- To process A1:A10
- make sure there is no data in B1:B10 (it will be the output), else insert
a column
- select A1:A10
- run the macro
-- the output is sent to B1:B10 so you can review and make sure it is what
you want before deleting cells in A

'-----------------------------------------------------------------
Sub RemoveBoldText()
Dim RgSource As Range, cell As Range
Dim cellTxt As String, c As Characters, txtOut As String
Dim cellLen As Long, i As Long

Set RgSource = Selection

Application.ScreenUpdating = False
For Each cell In RgSource.Cells
txtOut = ""
cellLen = cell.Characters.Count
For i = 1 To cellLen
If cell.Characters(i, 1).Font.Bold = False Then
txtOut = txtOut & cell.Characters(i, 1).Text
End If
Next
cell.Offset(0, 1) = txtOut
Next

End Sub
'------------------------------------------------------------

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Bob" wrote:

Hi all,
This group has been very helpful to me and Thank you for your help and quick
respond.

I don't think this is duable, but since I do not have programming
experience, I thought asking you.

I have a sheet that has 5000 records. User has to fill out column B with
the correct name, based on a column A I provided. E.g. Col A
HOUSE OF EUROPE
FUNDING IV PLC
In col B he has to fix this name and enter: FUNDING IV PLC
He didn't do so . Instead he highlighted BOLD in col A "FUNDING IV PLC" and
said use in col B highlighted name.
Question: Is there any way for me to say update Col B with part of the name
that is Bold on col. A? Otherwise I have to do this manually for 500 rec.

Thanks a lot

--
Bob

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble sorting first by a dates field and then by a text field. trainer07 Excel Discussion (Misc queries) 1 December 6th 06 12:25 AM
Changing a text field to a date field juliet New Users to Excel 4 February 21st 06 09:52 PM
How to keep leading zero without changing field to text field? Deni Excel Discussion (Misc queries) 1 October 24th 05 10:48 PM
How do I select only specific parts of one field? wearfinkle Excel Worksheet Functions 1 February 21st 05 03:46 PM
HELP!! Populate text in single XL field, or bulk copy text into 1 field filmfatale[_2_] Excel Programming 0 December 9th 03 02:30 PM


All times are GMT +1. The time now is 08:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"