TheBigOFace
New Member
- Joined
- Nov 6, 2017
- Messages
- 5
Long time lurker, first time poster,
I created a form on "Sheet 1" that utilizes a VLOOKUP function to fill specific cells.
This is my current code:
Sub CopyIngredients()
Sheets("Sheet 1").Select
Range("B18:R36").Select
Selection.Copy
Sheets("Sheet 2").Select
Range("B1").Select
Range("B1").End(xlDown).Offset(1, 0).Select
ActiveSheet.Paste
End Sub
The cells in the "B18:R36" range have the cells that contain the VLOOKUP formula in them. I am trying to paste the cell results into "Sheet 2" using an offset to create a new list.
Currently, for some reason, in rows 3-5 it pastes the formula itself which gives me the "#N/A" error, but in rows 6+ I get the actual formula value pasted. Not sure why, I've tried deleting the affected rows, but keep getting the same error.
I've managed to figure out most of the above VBA coding by scouring these forums, but this has me stumped.
Secondly, is there a way to sort merged cells in a table where each column might have a different number of cells merged into one.
Thanks
I created a form on "Sheet 1" that utilizes a VLOOKUP function to fill specific cells.
This is my current code:
Sub CopyIngredients()
Sheets("Sheet 1").Select
Range("B18:R36").Select
Selection.Copy
Sheets("Sheet 2").Select
Range("B1").Select
Range("B1").End(xlDown).Offset(1, 0).Select
ActiveSheet.Paste
End Sub
The cells in the "B18:R36" range have the cells that contain the VLOOKUP formula in them. I am trying to paste the cell results into "Sheet 2" using an offset to create a new list.
Currently, for some reason, in rows 3-5 it pastes the formula itself which gives me the "#N/A" error, but in rows 6+ I get the actual formula value pasted. Not sure why, I've tried deleting the affected rows, but keep getting the same error.
I've managed to figure out most of the above VBA coding by scouring these forums, but this has me stumped.
Secondly, is there a way to sort merged cells in a table where each column might have a different number of cells merged into one.
Thanks