ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Selecting Column Range (https://www.excelbanter.com/excel-programming/347824-selecting-column-range.html)

Desert Piranha[_14_]

Selecting Column Range
 

Hi all,

When i put a value into a cell in Column D.
Put bottom border in cells on that row, but just Columns A:F
This works except for the way i am selecting Col A:F
If i just put A or F it works for that one column.
Any direction?


Code:
--------------------
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 4 Then
With Range("A:F" & Target.Row)
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End With
End If
End Sub
--------------------


--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=492462


Leith Ross[_366_]

Selecting Column Range
 

Hello Desert Piranha,

With Range("A" & Target.Row, "F" & Target.Row)

Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=49246


Desert Piranha[_15_]

Selecting Column Range
 

Hi Leith,

Thats wonderfull. Works great.

Thanks much.
Dave
Leith Ross Wrote:
Hello Desert Piranha,

With Range("A" & Target.Row, "F" & Target.Row)

Sincerely,
Leith Ross



--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=492462



All times are GMT +1. The time now is 11:12 AM.

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