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 Automate this code

I have the following code:
For Each cell In Range("G11:O125")
c = Array(11, 10, 9, 8, 7)
For i = 0 To 4
If Cells(356, c(i)).Value = Cells(305, c(i)) And cell.Value "" An
Cells(cell.Row, c(i) + 97) = "x" Then _
cell.Value = Cells(9, c(i) + 97)
Next i
Next

On the If statement I need to offset one cell down in both ranges abou
50 rows. i.e. 357,358 : 306,307 etc.

As opposed to doing this:

If Cells(356, c(i)).Value = Cells(305, c(i)) And cell.Value
If Cells(357, c(i)).Value = Cells(306, c(i)) And cell.Value
If Cells(358, c(i)).Value = Cells(307, c(i)) And cell.Value
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
Using code to automate "h:mm" hol Excel Discussion (Misc queries) 6 November 30th 07 02:57 PM
use VB code IF to automate filling in 11 columns smart.daisy Excel Discussion (Misc queries) 1 May 29th 06 09:08 PM
Automate without add-ins Rob Oldfield Excel Discussion (Misc queries) 3 October 21st 05 07:33 PM
Automate PDF file creation in Excel code Ray[_11_] Excel Programming 5 May 17th 04 08:44 PM
VBA Code to automate "Save As" Kevin McLean Excel Programming 3 September 25th 03 11:56 PM


All times are GMT +1. The time now is 08:05 AM.

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"