LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default determine if first word of cell is capitalized

i am having issues with the code below:

Dim strCellAbove As String
Dim strCurrentCell As String
Dim s As String
Dim cell As Range

nlastrow = ActiveSheet.UsedRange.Rows.Count + ActiveSheet.UsedRange.Row
- 1
myrow = Selection.Row
howmany = nlastrow - myrow

Set cell2 = Range(Selection, Selection.Offset(howmany, 0))
cell2.Select

For Each cell In Selection
If cell.Value = LCase(cell.Value) Then
cell.Offset(-1, 0).Value = cell.Offset(-1, 0).Value & " " &
cell.Value
ActiveSheet.Rows(cell.Row).Delete
End If
Next


Example:

JACK AND JILL
Jack and Jill
jack and Jill

i need the code to read the first word and determine if it starts with
a capital letter or not. currently it looks for all lowercase so
looking at the third example it sees this as uppercase because "Jill"
is capitalized. i need it to focus only on the first word of the text
string.

Anyone with any ideas?

God bless
jsd219

 
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
Capitalized Excel Data paultheroach Excel Discussion (Misc queries) 1 June 29th 09 09:20 PM
Count # of Capitalized Characters Matt Excel Discussion (Misc queries) 3 March 11th 09 05:33 PM
CAPITALIZED ALL WORDS FROM WROKSHEET convert all capital letter from excel Excel Discussion (Misc queries) 2 May 1st 06 01:40 PM
convert capitalized text to small text (with Capitalized names an trailboss2 Excel Discussion (Misc queries) 2 October 5th 05 10:45 PM
determine page number in Word document Cath Victor Excel Programming 0 July 13th 03 08:39 AM


All times are GMT +1. The time now is 06:21 PM.

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"