Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default VBA to insert .xlborder if cell value not equal to previous cell

I've got a worksheet and I'm wondering whether it is possible to
insert a line when a value in Column A, B, C & D does not equal the
values in the row above or below it.

I've currently got a formula in Column A that reads....
=IF(AND(B3=B2,C3=C2,D3=D2,E3=E2),"","IL") and a conditional format
that if the cell value is equal to "IL" then put a border. Wondering
if there is a better way to do this via VBA or is that the better way?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 193
Default VBA to insert .xlborder if cell value not equal to previous cell

In your conditional formatting formula, instead of

=A1="IL"

(which I assume is what you've got)

Use:

=OR(B3<B2,C3<C2,D3<D2,E3<E2)



"Forgone" wrote in message
...
I've got a worksheet and I'm wondering whether it is possible to
insert a line when a value in Column A, B, C & D does not equal the
values in the row above or below it.

I've currently got a formula in Column A that reads....
=IF(AND(B3=B2,C3=C2,D3=D2,E3=E2),"","IL") and a conditional format
that if the cell value is equal to "IL" then put a border. Wondering
if there is a better way to do this via VBA or is that the better way?


Reply
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
How can I copy a value from a cell and paste it into another cell while adding it to the previous value in that cell [email protected] Excel Worksheet Functions 2 November 7th 07 09:39 AM
Equal to previous cell and named range KnappH Excel Worksheet Functions 0 March 13th 07 02:28 PM
How to point to (select) a cell to the left from a cell where I enter the = equal sign? Dmitry Excel Discussion (Misc queries) 4 June 30th 06 06:49 AM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM
Sum previous cell? Insert line.... William[_2_] Excel Programming 0 August 11th 03 09:24 PM


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