![]() |
replacing Offset with []
I have the following code that works fine:
For Each Cell In Range("D3:AJ19") If [D1] = Cell.Offset(0, -2) And [D1] <= Cell.Offset(0, -1) And _ [E24] = [ak1] And Cell.Offset(0, 33) = 2 Then For j = 0 To 6 Cell.Offset(0, j).Value = [AK$1] Next j But it only applies the conditions using the cell.offset reference. I the first If statement if I change If [D1] = Cell.Offset(0, -2) to If [D1]=[B3] The code starts to populate cells where D1 is not greate than B3. ? I don't want to restrict the code to the offset statement. I want t make the reference column B for each row Thank -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 05:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com