Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
I have 2 values that are taken from an Inputbox that I need to copy
across a range of cells what would be the best and most efficient way to do this? I need the values to be inserted into column A & B from the next Blank Cell in Column A Thanks Peter |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
On Aug 7, 4:09*pm, Pete wrote:
I have 2 values that are taken from an Inputbox that I need to copy across a range of cells what would be the best and most efficient way to do this? I need the values to be inserted into column A & B from the next Blank Cell in Column A Thanks Peter Perhaps something like: Sub AB() Dim A As Range, B As Range n = Cells(Rows.Count, "A").End(xlUp).Row + 1 Set A = Range("A" & n) n = Cells(Rows.Count, "B").End(xlUp).Row + 1 Set B = Range("B" & n) vA = Application.InputBox(Prompt:="Give a value for column A", Type:=1) vB = Application.InputBox(Prompt:="Give a value for column B", Type:=1) A.Value = vA B.Value = vB End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Blocked from Inserting individual cells or Insert Cut Cells | Excel Discussion (Misc queries) | |||
Insert Cells every other row | Excel Discussion (Misc queries) | |||
Insert Cut Cells | Excel Discussion (Misc queries) | |||
Can't insert cells | Excel Discussion (Misc queries) | |||
How to insert a value in one cell into many cells | Excel Worksheet Functions |