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: 14
Default If then Cell comparison with text.

I am trying to run an If..Then sequence that will look at
the value (Text Value) in Cell A1 and A4 and if they are
not equal insert a line on one side or the other.

For Example the following:

AB AB
AB AB
AB BC
BC BC
....

Would look like:
AB AB
AB AB
AB
BC BC
BC
....


So Far I have:

If Worksheets(5).Cells(Count, 1).Value Worksheets
(5).Cells(Count, 4).Value Then
Worksheets(5).Range(Cells(Count, 1), Cells(Count,
2)).Insert Shift:=xlDown
ElseIf Worksheets(5).Cells(Count, 1).Value < Worksheets
(5).Cells(Count, 4).Value Then
Worksheets(5).Range(Cells(Count, 4), Cells(Count,
5)).Insert Shift:=xlDown

End If


This does not work. It will keep inserting lines and
never stagger the cells.

Does anyone have any ideas?

Thank you

SS

 
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
text fragment comparison ChrisM Excel Worksheet Functions 2 January 6th 10 11:42 PM
Text comparison - closest match pappu Excel Discussion (Misc queries) 5 July 6th 06 10:41 AM
Text string comparison - closest match pappu Excel Discussion (Misc queries) 1 July 6th 06 04:23 AM
ow to create comparison chart using text as value data? deejohn525 Charts and Charting in Excel 1 April 27th 06 12:51 PM
Text comparison in adjacent cells Andy Excel Discussion (Misc queries) 3 January 23rd 06 05:58 PM


All times are GMT +1. The time now is 12:46 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"