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: 93
Default If Then HELP!!!

Dim r As Range
For Each r In ActiveSheet.UsedRange
If r.Interior.ColorIndex = 6 Then Cell.ange(Selection, Selection(30 -
Selection.Value)).EntireRow.Insert
Next

I'm not getting this right, and am unsure where to make a fix.
I want this code to select every cell that is yellow Insert rows based on
the value in the cell up to 30. So if there is a 16 it will insert 14 rows,
15 inserts 15 rows etc etc..... So what am I doing wrong with this code??

THANKS!!!!!
 
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



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