Multi Select Cells

  • Thread starter Thread starter David
  • Start date Start date
D

David

Hi all

Please help, I have 2 Sheets. 1 of Which is the database.

What I would like to do is to select diferent cells (only 1 cell from a
row) from the database (may be via a inputbox) and the cells Ive
selceted, the entire row is coppied (only values) to the other sheet.


Many thanks

Dave
 
Sub CopyRange()
Dim rng as Range
Dim rng1 as Range
On error resume Next
set rng = Application.Inputbox("Select single cell for row to copy", _
type:=8)
ON error goto 0
if rng is nothing then exit sub

On Error Resume Next
set rng = Application.InputBox("Select destination cell", _
type:=8)
On Errog goto 0
if rng1 is nothing then exit sub
rng.EntireRow.copy Destination:=
rng1.offset(0,-(rng1(1).Column-1))

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top