View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Macro with input box to Select a column on active sheet

It is unclear exactly what you want, but perhaps there is something here you
can use.

dim r as Range, r1 as Range
On error resume Next
set r = Application.InputBox("Select cell to paste to with mouse", type:=8)
set r1 = Application.InputBox("Select cells to copy with mouse", type:=8)
On error goto 0
if r is nothing or r1 is nothing then exit sub
r1.copy
r.PasteSpecial xlPasteAll, transpose = True

For completeness
There is a bug in the use of this function if your sheet contains
conditional formatting using the Formula Is dropdown:

http://www.jkp-ads.com/Articles/SelectARange.asp

Hopefully that won't affect you.
--
Regards,
Tom Ogilvy


"Marcusdmc" wrote:

I am trying to take information that is on a worksheet who's name
stays constant that gets updated daily from another one and then paste
that information into another worksheet. The layout would be

constantworksheet(data):

A1 B1 C1 D1
Name Jobtype1 Jobtype2 Jobtype3
Jdoe 5 21 6
Rdoe 8 18 7
and paste into a monthly worksheet

A1 B1 C1 D1
Name Day1 Day2 Day3 ....
Jdoe
Jobtype1 5
Jobtype2 21
Jobtype3 6
Totals sum
Rdoe
Jobtype1 5
Jobtype2 18
Jobtype3 7

how would I get a macro automatically pull over the information?
Would I do a lookup on the name of the activesheet to the datasheet,
select which column i want, then use offset 0,1 to move down a column
and use an input box to select which day(column) they want to paste
information in for each person? Any direction would be appreciated!

-Marcus