VB Reporting On Late Projects

MrCrimmy

New Member
Joined
Sep 26, 2014
Messages
14
Hi All,

I am having a lot of trouble with a particular spreadsheet I'm trying to develop. It's a project tracking tool and what I need to do is copy and past all the late projects into a specific sheet for review with our dept heads which is quite laborious. I am trying to find someway to copy an entire row of cells dependant on one cell and past it into the second work sheet entitled 'Late Projects'.

This is how each project is displayed:


Project
Project Subheading
Assigned
Created
Due
Completed:
Status
Project 1
Project 1A
John
01Nov14
20Nov14
LATE

<TBODY>
</TBODY>

So effectively I need to scan down through, pick out the lates and copy all the info seen above into a second sheet.

Can anyone provide any help here? I undrestand the basics of VB but I am unsure of how to do this without telling which specific cells to copy and which to paste to. It also doesn't have to use a macro either that was just my approach

I hope that was clear

Thank you

Bryan
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hello,

does this work as expected?

Code:
Sub MOVE_LATE_PROJECTS()
    Application.ScreenUpdating = False
    For MY_ROWS = Range("A" & Rows.Count).End(xlUp).Row To 2 Step -1
        If Range("G" & MY_ROWS).Value = "LATE" Then
            Rows(MY_ROWS).Copy
            With Sheets("Late Projects")
                .Range("A" & .Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial (xlPasteAll)
            End With
            Rows(MY_ROWS).Delete
        End If
    Next MY_ROWS
    Application.ScreenUpdating = True
End Sub

change Sheet names as required.
 
Upvote 0
Hi there,

thank you for your reply, unfortunately not, it's not showing any errors but nothing is happening, perhaps i have missed something i was supposed to change. this is what i tried:

Sub MOVE_LATE_PROJECTS()
Application.ScreenUpdating = False
For MY_ROWS = Range("B" & Rows.Count).End(xlUp).Row To 2 Step -1
If Range("H" & MY_ROWS).Value = "late" Then
Rows(MY_ROWS).Copy
With Sheets("late projects")
.Range("B" & .Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial (xlPasteAll)
End With
Rows(MY_ROWS).Delete
End If
Next MY_ROWS
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Hello,

Code:
Sub MOVE_LATE_PROJECTS()
    Application.ScreenUpdating = False
    For MY_ROWS = Range("B" & Rows.Count).End(xlUp).Row To 2 Step -1
        If UCase(Range("H" & MY_ROWS).Value) = "LATE" Then
            Range("A" & MY_ROWS & ":H" & MY_ROWS).Copy
            With Sheets("late projects")
                .Range("B" & .Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial (xlPasteAll)
            End With
            Rows(MY_ROWS).Delete
        End If
    Next MY_ROWS
    Application.CutCopyMode = False
    Application.ScreenUpdating = True
End Sub

Is the source sheet the active sheet when you run the macro?
is there data in col B?
is the late projects sheet name exactly spelt the same?

Have changed the code to copy cols A:H of the specific row (change as required).

You can run through the code line by line if you press F8 when you have the
code window active.
 
Upvote 0
Sorry for my delay in getting back to you, yeah the macro is run in the active sheet, there is data in col B, a better representation of how its laid out can be seen below(The status column is after the three dates, wouldn't fit in the box lol). I have ensured each sheet is named the same, any help you can offer is appreciated:


a b c d e f
Main Project Start DateDue Date Completed dateStatus
Sub Proj01/01/1401/11/14late
Sub Proj01/01/1401/01/15Not due yet
Sub Proj01/01/1401/01/1401/01/14Complete

<TBODY>
</TBODY>
 
Upvote 0

Forum statistics

Threads
1,215,480
Messages
6,125,050
Members
449,206
Latest member
Healthydogs

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top