LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
replacing a #na Pammy Excel Discussion (Misc queries) 2 October 14th 07 03:54 AM
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul RyGuy Excel Worksheet Functions 2 September 28th 07 10:54 PM
Replacing #N/A RFJ Excel Worksheet Functions 1 December 11th 06 04:39 PM
Replacing #DIV/0! With Just 0 Mike Excel Worksheet Functions 2 November 29th 05 11:30 PM
replacing #N/A with 0 Mark Excel Discussion (Misc queries) 3 April 7th 05 10:02 PM


All times are GMT +1. The time now is 08:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"