Take data from one workbook and put it into next empty row, which contains drop down menus

cmac14

New Member
Joined
Jan 18, 2014
Messages
1
Greetings!
A VB novice but I almost have it figured out except when I run the following code on "2014 Incident Reporting Form.xlsm" to transfer datat to "2014 Injury Dashboard.xlsm". It seems to ingnore any cells in the dashboard file that have data validation with drop down boxes and posts to cells that already have values in them, instead of the empty cell at the bottom of the colum. Any help is appreciated

The bolded/underlined text is where it doesn't find the empty row in that column.

Code:
Sub InputToDashboard()
' InputToDashboard Macro
' This Macro will copy data from the form into the Injury Dashboard xls file.'
'
    Workbooks.Open Filename:="C:\Reports\2014 Injury Dashboard.xlsm"
    Windows("2014 Incident Reporting Form.xlsm").Activate
    Range("F4").Select
    Selection.Copy
    Windows("2014 Injury Dashboard.xlsm").Activate
    Range("C1").End(xlDown).Offset(1, 0).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    
    Windows("2014 Incident Reporting Form.xlsm").Activate
    Range("C6").Select
    Application.CutCopyMode = False
    Selection.Copy
    Windows("2014 Injury Dashboard.xlsm").Activate
    Range("D1").End(xlDown).Offset(1, 0).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    
    Windows("2014 Incident Reporting Form.xlsm").Activate
    Range("C22").Select
    Application.CutCopyMode = False
    Selection.Copy
    Windows("2014 Injury Dashboard.xlsm").Activate
    [U][B]Range("E1").End(xlDown).Offset(1, 0).Select
[/B][/U]  Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    
    Windows("2014 Incident Reporting Form.xlsm").Activate
    Range("C20").Select
    Application.CutCopyMode = False
    Selection.Copy
    Windows("2014 Injury Dashboard.xlsm").Activate
    Range("F1").End(xlDown).Offset(1, 0).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    
    Windows("2014 Incident Reporting Form.xlsm").Activate
    Range("C24").Select
    Application.CutCopyMode = False
    Selection.Copy
    Windows("2014 Injury Dashboard.xlsm").Activate
    Range("G1").End(xlDown).Offset(1, 0).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    
    Windows("2014 Incident Reporting Form.xlsm").Activate
    Range("F10").Select
    Application.CutCopyMode = False
    Selection.Copy
    Windows("2014 Injury Dashboard.xlsm").Activate
    Range("H1").End(xlDown).Offset(1, 0).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    
    Windows("2014 Incident Reporting Form.xlsm").Activate
    Range("C12").Select
    Application.CutCopyMode = False
    Selection.Copy
    Windows("2014 Injury Dashboard.xlsm").Activate
    Range("I1").End(xlDown).Offset(1, 0).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    
    Windows("2014 Incident Reporting Form.xlsm").Activate
    Range("F16").Select
    Application.CutCopyMode = False
    Selection.Copy
    Windows("2014 Injury Dashboard.xlsm").Activate
   Range("J1").End(xlDown).Offset(1, 0).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    
    Windows("2014 Incident Reporting Form.xlsm").Activate
    Range("C10").Select
    Application.CutCopyMode = False
    Selection.Copy
    Windows("2014 Injury Dashboard.xlsm").Activate
    Range("K1").End(xlDown).Offset(1, 0).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    
        Windows("2014 Incident Reporting Form.xlsm").Activate
    Range("C8").Select
    Application.CutCopyMode = False
    Selection.Copy
    Windows("2014 Injury Dashboard.xlsm").Activate
    Range("L1").End(xlDown).Offset(1, 0).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
        
    Windows("2014 Incident Reporting Form.xlsm").Activate
    Range("C14").Select
    Application.CutCopyMode = False
    Selection.Copy
    Windows("2014 Injury Dashboard.xlsm").Activate
    Range("N1").End(xlDown).Offset(1, 0).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    
    Range("M7").Select
    
    Windows("2014 Incident Reporting Form.xlsm").Activate
End Sub
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,071
Latest member
cdnMech

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