I'm relatively new to VBA and I'm currently trying to make my life easier by refering to named ranges rather than specific cells (I'm still working on the overall workbook, and I don't want to keep having to change the references every time a cell moves). As far as I know, it shouldn't be a big issue to use a named range rather than the cell address?
The below code is a specific part of a bigger code that I'm working on. It simply inputs the value from one cell (which contains a formula in the worksheet) to the cell above it. I can make this happen with the code "wsi.Cells(19, 10).Value = Cells(20, 10).Value", but I can't make it work using named ranges set as integers.
I've tried a couple of variations, but I keep hitting errors, so any advice would be great!
Edit: Deleted a couple of lines of code that were irrelevant to the post.
Sub Test1()
Application.CutCopyMode = False
Dim wsi As Worksheet
Dim StartA As Integer
Dim StartB As Integer
Set wsi = Worksheets("Input")
StartA = wsi.Range("In_StartA")
StartB = wsi.Range("In_StartB")
StartA = StartB
End Sub