-1

I've been searching the posts relating to using macro to copy rows and paste to a new sheet in excel but I can't seem to find the right code that matches my requirement. Here's a sample data to start off: Sample Data Sheet

I have a DATA sheet containing 7 columns:

COLUMN A - Article #
COLUMN B - Description
COLUMN C - Lift
COLUMN E - Comp OH
COLUMN F - Requested
COLUMN G - Shipped
COLUMN H - SOS OH

I want to create a macro that will copy the contents of this sheet based on the COLUMN F - Requested and place them on a new sheet to be named REQUESTED.

The end result should be something like this:

Sample of Results

Ron Rosenfeld
  • 53,870
  • 7
  • 28
  • 60
coteb
  • 1
  • 1
  • 3
  • If the code that you developed after looking at all those other posts isn't working, please include it in your question and tell us what isn't working as you thought it would. We can then help you to fix it. – YowE3K Jun 17 '17 at 21:59
  • 3
    Possible duplicate of [Vba macro to copy row from table if value in table meets condition](https://stackoverflow.com/questions/12177125/vba-macro-to-copy-row-from-table-if-value-in-table-meets-condition) – lebelinoz Jun 18 '17 at 00:32
  • Just use a filter, and copy the visible cells. Record a macro while you are doing that, if you must use VBA. – Ron Rosenfeld Jun 18 '17 at 01:30

1 Answers1

0

This helps you **strong text**

This is the sheet1 rough data enter image description here This is the Reuested Formule enter image description here This is the Reay layout enter image description here this is your Ansver After starting macro

You can use this macro to hide and unhide

Sub hide()
Sheets("Requested").Select
    Dim r As Range, c As Range
    Set r = Range("F2:F10")
Application.ScreenUpdating = False
For Each c In r
    If Len(c.Text) = 0 Then
        c.EntireRow.Hidden = True
    Else
        c.EntireRow.Hidden = False
    End If
Next c
Application.ScreenUpdating = True
End Sub

Sub Unhide_All_Rows()
Sheets("Requested").Select

    On Error Resume Next
     'in case the sheet is protected
    ActiveSheet.Cells.EntireRow.Hidden = False
End Sub
Kemal K.
  • 301
  • 2
  • 7