View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
alymcmorland[_6_] alymcmorland[_6_] is offline
external usenet poster
 
Posts: 1
Default changing rows for columns


This peice of code goes all the way across the workbook an changes white
blank columns to white columns with IN written on it.

Can anyone adapt this code so that it goes down a column rather than
across a row, i tried changing the words Row to Column but that didn't
work!


VBA:

Sub Macro_In()
Dim c As Range

For Each c In Range(Cells(ActiveCell.Row, 4), Cells(ActiveCell.Row,
56))
If c.Interior.ColorIndex = 2 Or c.Interior.ColorIndex < 0 And
Len(c) = 0 And c.FormulaR1C1 = "" Then
c = "IN"
End If

Next c

End Sub


--
alymcmorland
------------------------------------------------------------------------
alymcmorland's Profile: http://www.excelforum.com/member.php...o&userid=27652
View this thread: http://www.excelforum.com/showthread...hreadid=477143