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: 1
Default Compare first characters in two cells

I have a spreadsheet of surnames in alphabetical order. As these were
OCR'd some of the entries got split into two cells e.g. This would be a
typical list:

Adams John Jones
Robert
Adams Michael
Adams Albert.

The split is random so one can't select every nth cell

As this is over 35K rows long. I am trying to move those split names
such as Robert to an adjacent cell to the right of the correct name. So
after processing it would look like:
Adams John Jones Robert
Adams Michael.

I thought the best way to do this would be to start at the top of the
column, read the first character in the cell e.g. A, (Adams John Jones)
go down a line and read the next first character R (Robert)and compare.
If the two characters are the same then I would compare the second one
R (Robert) with the next one down; A (Adams Michael). If they were
different then I would move the second entry Robert up and across one
row. Go back to the column and down a row to avoid the now blank cell
and compare two cells again until the end is reached.

I am having real problems in figusring out how to select just the first
character in a cell and then compare it with another.
Thanks

john


---
Message posted from http://www.ExcelForum.com/

 
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
compare 2 column cells and return the adjacent columns cells data of the cell trebor57 Excel Worksheet Functions 1 February 1st 11 02:54 PM
Compare 1 cell to column of cells returning adjacent cells info? Mr. Fine Excel Worksheet Functions 1 April 15th 10 07:36 PM
Compare One Cell to the First 10 Characters of Another Cell Jill Excel Worksheet Functions 9 May 8th 08 07:09 PM
How do I compare cells and if FALSE compare to next cell in EXCEL Cindie Excel Worksheet Functions 0 March 24th 06 05:29 PM
255 characters in cells David Perry Excel Discussion (Misc queries) 2 January 26th 05 01:31 AM


All times are GMT +1. The time now is 08:27 PM.

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

About Us

"It's about Microsoft Excel"