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 Values run out of range

Hi I'm using the following code, that places text values in a row a
specific points in the row. The problem is that sometimes the value
exceed the range of the defined range that I'm working in

The overall range is G11:CX15

But if a cell has a value greater than "" and that value is less tha
32 cells from end of the range. It will start adding values out of th
range.

Is there a way I can make the code stopanytime it tries to go beyond C
?

Thanks.

For Each cell In Range("G11:CP287")
If cell.Value "" Then
If (cell.Offset(0, -1) = "") Then
cell.Offset(0, 7).Value = "Brk"
cell.Offset(0, 14).Value = "Lun"
cell.Offset(0, 15).Value = "Lun"
cell.Offset(0, 24).Value = "Brk"

End If
End I

--
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
calculate values in an unlimited range of cells in a column WITHOUTalso calculating values that had previously been filtered AGAINST? yadang Excel Discussion (Misc queries) 2 October 1st 09 06:18 PM
SUMPRODUCT or SUMIF if any values in a range equal any values in another range PCLIVE Excel Worksheet Functions 3 July 15th 09 07:43 PM
Cond. Format Data Bars of range based on values of another range alexmo Excel Worksheet Functions 4 January 16th 09 04:03 AM
Search/Filter to find values in another range based on two cell values Andy Excel Programming 2 April 29th 04 04:08 PM


All times are GMT +1. The time now is 12:19 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"