Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Dependent On Cell Value
I have data on Sheet1 Range A5:E25, A contains text B:E contains values. I want to copy the data from Sheet1 to Sheet 2 dependent on the text in Sheet 1 Column A. Example: If A5 on Sheet 1 is < than "Other Publisher Groups" I want to copy A5:E5 to Sheet 2 cell B4:F4. If A5 on Sheet 1 is ="Other Publisher Groups" I want to drop down a row and copy A6:E6 to Sheet 2 cell B4:F4. In short If the value in A is < to "Other Publisher Groups" I want to copy Sheet1 A5:E5 to Sheet 2 B4:F4 Then Sheet1 A6:E6 to Sheet 2 B5:F5 Sheet1 A7:E7 to Sheet 2 B6:F6 If Sheet1 A8 = "Other Publisher Groups" I would jump a row i.e. Sheet1 A9:E9 to Sheet 2 B7:F7 Hope that makes sense. -- Timbo ------------------------------------------------------------------------ Timbo's Profile: http://www.thecodecage.com/forumz/member.php?userid=24 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=98084 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Dependent On Cell Value
I think you just want to copy rows that don't havve "Other Publisher Groups"
Sub movedata() DestRow = 4 With Sheets("Sheet1") RowCount = 4 Do While .Range("A" & RowCount) < "" If .Range("A" & RowCount) < "Other Publisher Groups" Then .Range("A" & RowCount & ":E" & RowCount).Copy _ Destination:=Sheets("Sheet2").Range("B" & DestRow) DestRow = DestRow + 1 End If RowCount = RowCount + 1 Loop End With End Sub "Timbo" wrote: I have data on Sheet1 Range A5:E25, A contains text B:E contains values. I want to copy the data from Sheet1 to Sheet 2 dependent on the text in Sheet 1 Column A. Example: If A5 on Sheet 1 is < than "Other Publisher Groups" I want to copy A5:E5 to Sheet 2 cell B4:F4. If A5 on Sheet 1 is ="Other Publisher Groups" I want to drop down a row and copy A6:E6 to Sheet 2 cell B4:F4. In short If the value in A is < to "Other Publisher Groups" I want to copy Sheet1 A5:E5 to Sheet 2 B4:F4 Then Sheet1 A6:E6 to Sheet 2 B5:F5 Sheet1 A7:E7 to Sheet 2 B6:F6 If Sheet1 A8 = "Other Publisher Groups" I would jump a row i.e. Sheet1 A9:E9 to Sheet 2 B7:F7 Hope that makes sense. -- Timbo ------------------------------------------------------------------------ Timbo's Profile: http://www.thecodecage.com/forumz/member.php?userid=24 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=98084 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how blank data validation cell after changing dependent cell? | Excel Discussion (Misc queries) | |||
Copy from one named cell to another dependent on content of a third. | Excel Worksheet Functions | |||
Jumping reference cell in dependent cell formula | Excel Worksheet Functions | |||
Another cell formatting dependent on cell contents question / message box popup? | Excel Programming | |||
Change Cell Color dependent on Cell Contents | Excel Programming |