Trying to organize data by project status, into three different sections within a single worksheet with separating headers, that is fed from an input form. My input form is an add record button that is supposed to feed three total worksheets. (Trying to search "Inputs" to organize data that would then input into "Tracking Log")

I have tried to use an if statement to search the original input page first for project status, that would then organize the input data below the headers in a separate worksheet.


Dim al As Worksheet
Dim vc As Worksheet
Dim x As Long
Dim b As String

Set vc = ThisWorkbook.Sheets("Inputs")
Set al = ThisWorkbook.Sheets("Tracking Log")

x = al.Range("B" & Application.Rows.Count).End(xlUp).Row

'Filter inputs by project status into their project section (Closed)

        If vc.Cells.Value = "CLOSED PROJECTS" or vc.Cells.Value = "On Hold" or vc.cells.value = "Open" Then 

'al.Unprotect "Welcome123"

    al.Range("A" & x + 1).Value = Me.xxxx.Value
    al.Range("B" & x + 1).Value = Me.xxxx.Value
    al.Range("C" & x + 1).Value = Me.xxxx.Value
    al.Range("D" & x + 1).Value = Me.xxxx.Value
    al.Range("E" & x + 1).Value = Me.xxxx.Value
    al.Range("F" & x + 1).Value = Me.xxxx.Value
    al.Range("G" & x + 1).Value = Me.xxxx.Value
    al.Range("H" & x + 1).Value = Me.xxxx.Value
    al.Range("I" & x + 1).Value = Me.xxxx.Value
    al.Range("J" & x + 1).Value = Me.xxxx.Value
    al.Range("K" & x + 1).Value = Me.xxxx.Value
    al.Range("L" & x + 1).Value = Me.xxxx.Value
    al.Range("M" & x + 1).Value = Me.xxxx.Value
    al.Range("N" & x + 1).Value = Me.xxxx.Value
    al.Range("O" & x + 1).Value = Me.xxxx.Value
    al.Range("P" & x + 1).Value = Me.xxxx.Value
    al.Range("Q" & x + 1).Value = Me.xxxx.Value
    al.Range("R" & x + 1).Value = Me.xxxx.Value
    al.Range("S" & x + 1).Value = Me.xxxx.Value
    al.Range("T" & x + 1).Value = Me.xxxx.Value
    al.Range("U" & x + 1).Value = Me.xxxx.Value
    al.Range("V" & x + 1).Value = Me.xxxx.Value
    al.Range("W" & x + 1).Value = Me.xxxx.Value
    End If

Trying to organize the inputs by the project status to be under the appropriate header within the worksheet. (Ex. Project Status = Closed should go under the Closed Project header, same for Open project, and on hold)

0 Answers