Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks. There are a few blank spaces, but I can probably modify your code
to accomodate. "kkknie " wrote in message ... begin loop if a = true (cell contains a certain value) copy paste skip 3 copy & paste again else (cell doesn't contain a value) move onto next row end if end loop I'll make some assumptions for the example: 1. I'm assuming all of your data is in column a and that all rows are filled (i.e. no blank spaces in until the last row). 2. Assume you paste one column over and then 3 columns over (1+skip 3). 3. Assume you are looking for the value HELLO. Here's a go... Code: -------------------- Sub Testing() Dim iMax as Long Dim rng as Range Dim r as Range iMax = Range("A65536").End(xlUp).Row Set rng = Range("A1:A" & iMax) For Each r in Range If r.Value = "HELLO" Cells(r.Row,2).Value = r.Value Cells(r.Row,5).Value = r.Value End If Next End Sub -------------------- Look it over and post back with questions. K --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Code to conditional format all black after date specified in code? | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
copying vba code to a standard code module | Excel Discussion (Misc queries) | |||
VBA code delete code but ask for password and unlock VBA protection | Excel Programming |