0

I have a spreadsheet with various columns that are individually copied and pasted by individual macros per column to a different sheet beginning on the next empty row. This is working perfectly and as expected but there is an unprecedented problem:

Column C is an Account Name. Column D is a Transaction Description.

Column C never contains empty spaces. Column D however sometimes does not have a Transaction description on the very last cell of the column. The next time you apply the macro, it will paste the beginning data to the next empty cell in column D so it is not lining up properly and then the range on that column going south is offset by 1 or more cells.

My question, in plain english is:

Begin the pasting job on the next empty cell of Column D, but not if Column C has data next to it.

Edit:

Here is the code that I am currently using:

`Sub SAMPLE_COPYOVER_BOA_G()
    Sheets("BANK OF AMERICA").Select
    Rows("6:6").Select
    Selection.AutoFilter
    ActiveSheet.Range("$A$6:$T$1000").AutoFilter Field:=2, Criteria1:="<>"
    Range("G7:G1000").Select
    Selection.Copy
    Sheets("COMBINED").Select
    Sheets("COMBINED").Cells(Rows.Count, "C").End(xlUp).Offset(1). _
    PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
    SkipBlanks:=False, Transpose:=False
   Sheets("COMBINED").Select

End Sub`

This code works fine, but the problem is that when I go to Column D's macro it will paste beginning with the next blank row disregarding whether Column C is longer or shorter.

Rob O
  • 27
  • 3
  • 6
    If you want help fixing your code, it's best to include it in your question. If ColC never has empty spaces then you should use that to determine the next paste row. – Tim Williams Jan 08 '20 at 19:23
  • 3
    [HINT](https://stackoverflow.com/questions/11169445/error-in-finding-last-used-cell-in-excel-with-vba/11169920#11169920) – Siddharth Rout Jan 08 '20 at 19:23

0 Answers0