chrisinparra
Technical User
I have two named ranges which each contain multiple areas.
read_area ='Read_Sheet'!$I$24:$I$33,'Read_Sheet'!$J$37,'Read_Sheet'!$C$40,'Read_Sheet'!$E$42
edit_area ='Edit_Sheet'!$V$54:$V$63,'Edit_Sheet'!$U$67,'Edit_Sheet'!$T$70,'Edit_Sheet'!$V$72
I'd like to copy the value from each cell in read_area to the corresponding cell in edit_area. Cells.Item(b) is not working. I expected Item(11) to be the 11th cell in the range edit_area i.e. 'Edit_Sheet'!$U$67, but it is not. It returns the 11th cell from the start, which is 'Edit_Sheet'!$V$64, which isn't even in edit_area. I have also tried the For each cell in edit_area method, but I can't figure out how to reference the corresponding cell in read_area.
Sub edit_form(read_area, edit_area)
Dim cell As Range
'copy values from read area to edit area
For b = 1 To Range(edit_area).Cells.Count
Range(edit_area).Cells.Item(b).Value = Range(read_area).Cells.Item(b).Value
Next cell
End Sub