Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
replacing a #na | Excel Discussion (Misc queries) | |||
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul | Excel Worksheet Functions | |||
Replacing #N/A | Excel Worksheet Functions | |||
Replacing #DIV/0! With Just 0 | Excel Worksheet Functions | |||
replacing #N/A with 0 | Excel Discussion (Misc queries) |