Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I need a macro that searches column B for any cells with a date format (any date format). If true, I need cells (B:F) (in the same row), to be cut and pasted to the row above in columns (D:H). Then I need that original row to be deleted.
I have found a few macros and functions that are similare but none that work for what I need. I would greatly appreciate any help anyone can give! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
MaryGHunter wrote:
I need a macro that searches column B for any cells with a date format (any date format). If true, I need cells (B:F) (in the same row), to be cut and pasted to the row above in columns (D:H). Then I need that original row to be deleted. I have found a few macros and functions that are similare but none that work for what I need. I would greatly appreciate any help anyone can give! Test this against a *copy* of your data; don't test against live data. Sub findDatesCopyAndKill() For L0 = 2 To Cells.SpecialCells(xlCellTypeLastCell).Row If IsDate(Cells(L0, 2).Value) Then Range("B" & L0 & ":F" & L0).Copy Range("D" & L0 - 1) Rows(L0).Delete L0 = L0 - 1 End If Next End Sub -- The siren sings a lonely song of all the wants and hungers... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Search , then copy and paste from multiple worksheets. VBA help | Excel Programming | |||
search, copy and paste through multiple sheets | Excel Discussion (Misc queries) | |||
search and paste information - multiple pages | Excel Worksheet Functions | |||
Search for multiple cells with a row for matching criteria, then sum up certain column | Excel Programming | |||
Search Column then Paste Data at end of Row? | Excel Programming |