Sure. I have 3 different entries to enter so I adjusted for that. Originally the data was on 1 sheet and the paste was on another. So I just modified the one sheet and linked to that on the other. The macro ended up looking like this:
Sub CopyByCriteria276()
Dim col
col = Range("N14").Value + 1 'detect value in N14 and adjust number to columns 1-5 (B-F)
Range(Cells(15, col), Cells(25, col)).Copy 'copy area from your chosen column
Range("N16").PasteSpecial Paste:=xlPasteValues 'paste values starting from B5 and down to B15
Application.CutCopyMode = False
End Sub
Sub CopyByCriteria397()
Dim col
col = Range("N14").Value + 1 'detect value in N14 and adjust number to columns 1-5 (B-F)
Range(Cells(32, col), Cells(42, col)).Copy 'copy area from your chosen column
Range("N29").PasteSpecial Paste:=xlPasteValues 'paste values starting from B5 and down to B15
Application.CutCopyMode = False
End Sub
Sub CopyByCriteria1829()
Dim col
col = Range("N14").Value + 1 'detect value in N14 and adjust number to columns 1-5 (B-F)
Range(Cells(49, col), Cells(59, col)).Copy 'copy area from your chosen column
Range("N42").PasteSpecial Paste:=xlPasteValues 'paste values starting from B5 and down to B15
Application.CutCopyMode = False
End Sub
And the execution code:
Sub PeriodDebitCredits()
Dim path As String
path = ThisWorkbook.path
Application.ScreenUpdating = False
On Error GoTo errorhandler2
UserForm1.Show
UnprotectMe
Sheets("helper").Select
CopyByCriteria276
CopyByCriteria397
CopyByCriteria1829
finish:
Sheets("worksheet").Select
ActiveSheet.Unprotect
Range("A1").Select
ActiveCell.FormulaR1C1 = "Debits/Credits Imported from Period:"
ProtectMe
ActiveWindow.SmallScroll Down:=-80
Range("f1").Select
ProtectMe
Exit Sub
errorhandler2:
MsgBox "ERROR"
End Sub
i know it's rudimentary but as long as it works right? I won't embarrass myself and show what I was using prior to your help, but it DID work.
Thanks again.