ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Add line between previous and current cells . . (https://www.excelbanter.com/excel-programming/316437-add-line-between-previous-current-cells.html)

Jeff Roper[_4_]

Add line between previous and current cells . .
 

I am trying to add a line between the last selected cell and the current
cell (in the same column), and I don't know the syntax on that. The
recorded macro just went to the same spot every time and didn't move
along with the new data. What I'm really trying to do is to have the
worksheet automatically add a line between the previous cell and the
current cell, when a new month has been entered. Is it possible?
:confused:

Ex:

| A | B |
|---------------|----------------|
1| 11/10/04 | |
--|---------------|---------------|
2| 12/01/04 | |
3| 12/05/04 | |
--|-------------------------------|
4| 01/05/04 | |


--
Jeff Roper
------------------------------------------------------------------------
Jeff Roper's Profile: http://www.excelforum.com/member.php...o&userid=16293
View this thread: http://www.excelforum.com/showthread...hreadid=277324


keepITcool

Add line between previous and current cells . .
 

you could use conditional formatting for that.

select the column.
(i'll assume we're in cell A1

Format/Conditional formatting

in the DD select formula
in the box enter =month(a1)<month(a2)
click the format button, assign the bottom border a nice line.

done.



--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Jeff Roper wrote :


I am trying to add a line between the last selected cell and the
current cell (in the same column), and I don't know the syntax on
that. The recorded macro just went to the same spot every time and
didn't move along with the new data. What I'm really trying to do is
to have the worksheet automatically add a line between the previous
cell and the current cell, when a new month has been entered. Is it
possible? :confused:

Ex:

A | B |
---------------|----------------|

1| 11/10/04 | |
--|---------------|---------------|
2| 12/01/04 | |
3| 12/05/04 | |
--|-------------------------------|
4| 01/05/04 | |



All times are GMT +1. The time now is 05:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com