![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 9
|
Is there a way to write a formula to examine the preceding row and if the value is the same, leave the cell blank. For Example:
Column A 2 2 2 2 2 2 9 9 9 9 What I want it to do is this: Column A 2 9 |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: United Kingdom
Posts: 68
|
Assuming your data in ColA starts at A2, eneter the follwoing formula in B2
=IF(A2=A1,"",A2) then paste down your column. Nobby |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
supposing that the first item is in A2, enter in B2 =IF(COUNTIF($B$1:B1,A2),"",A2) and copy down. |
|
|
|
|
|
#4 |
|
New Member
Join Date: Apr 2002
Posts: 9
|
Thanks for the info but is there any way to keep the data in Column A. I put your formula in colA and keep getting a circular reference error.
Thanks |
|
|
|
|
|
#5 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
You'll need VBA code to do it in the same column. |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|