Row checking Macro

zoog25

Active Member
Joined
Nov 21, 2011
Messages
418
Hello All,

I'm currently working on updating a logging system we use at work.

Currently the log has 4 Columns.

I have revised the log in order to add a macro program to automatize a few items. So here is what we have.

Column A has been page set to either have a blank or "C". This being if any changes have been made to columns B, C, D, or E.

Now at the same time I want the following to happen. Depending on which row the "C" appears, a macro would run to check the row to see if all the four columns have been filled. If they are filled then a message window would appear with a yes no option. Prompt would be something like. "All check items have been filled for (Name of project located in column F). Would you like to run report?". If the user presses no, then Column A would change the "C" to a "P" (For pending) and close. (I'll be programming another macro to go back and do something with all the "P" in column A. Otherwise if the user presses Yes. The first message window closes and a new window opens saying "Report being generated" and a macro called "NOC" would run which generates a special report.

Anyways i have been researching how to do this and am having a problem wrapping my brain around this task. It's been several years since i last wrote macros so i'm rusty and think with a little help and direction, i can get back in the game. Anyways, can anyone please provide some assistance or let me know if you require additional information for help.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Try this

Code:
Sub t()
Dim fn As Range, rpt As Variant
Set fn = Columns(1).Find("C", , xlValues, xlWhole)
    If Not fn Is Nothing Then
        If Application.CountA(fn.Offset(, 1).Resize(, 4)) = 4 Then
            rpt = MsgBox("All check items are filled for " & fn.Offset(, 5).Value & ".  Would you like to run report?", vbQuestion + vbYesNo, "OPTION")
                If rpt = vbYes Then
                    MsgBox "Report being generated!", vbExclamation, "REPORT"
                    NOC
                End If
        Else
            fn = "P"
        End If
    End If
End Sub
 
Upvote 0
Thank you JLGWhiz,

I'm testing the information you sent. I'll let you know if it ends up working.
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,431
Members
448,961
Latest member
nzskater

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