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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,195,595
Messages
6,010,632
Members
441,558
Latest member
lambierules

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
Top