Here is a macro that could work for you. In order to have it run, you just need to name cell D4 as "Top_Left_Corner". The macro uses this named range as a reference.
I've put the inputbox inside the Resize function. If the user click on Cancel, the macro will make no change in this dimension.
Sub Expand_Table_To_User_Needs()
'
Range("Top_Left_Corner").Offset(-2, 0).Resize(2).Select
Selection.Copy
On Error Resume Next
Range("Top_Left_Corner").Offset(-2, 0).Resize(2, InputBox("Enter number of columns needed", "NUMBER OF COLUMNS", 5, 300, 300)).Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.DataSeries Rowcol:=xlRows, Type:=xlLinear, Date:=xlDay, Step _
:=1, Trend:=False
Range("Top_Left_Corner").Offset(0, -3).Resize(, 3).Select
Selection.Copy
Range("Top_Left_Corner").Offset(0, -3).Resize(InputBox("Enter number of rows needed", "NUMBER OF ROWS", 5, 300, 300), 3).Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.DataSeries Rowcol:=xlColumns, Type:=xlLinear, Date:=xlDay, _
Step:=1, Trend:=False
Range("Top_Left_Corner").Select
End Sub
Bookmarks