Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
value of a cell based upon column letter and variable for row#
Please forgive the dumb question....
A user enters daily data into a worksheet. I need to create a macro that inserts the daily values from that worksheet into a different worksheet based upon the value of a variable. The values from the daily worksheet are from 3 or 4 columns and about 20 rows. They will all need to placed into cells in one row on the other worksheet. For example... If variable equals 2 Daily Worksheet -- Monthly Worksheet A1 -- B2 A9 -- C2 D15 -- D2 C30 -- E2 I am completely lost. Please help! TIA, Tod |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
value of a cell based upon column letter and variable for row#
Dim lngVar as Long
Dim sh as Worksheet, j as long, i as long Dim varr as variant lngVar = 2 set sh = worksheets("Daily") varr = Array("A1","A9","D15","C30") with Worksheets("Monthly) j = 1 for i = lbound(varr) to ubound(varr) j = j + 1 .Cells(lngVar,j).Value = sh.Range(varr(i)).Value Next End With -- Regards, Tom Ogilvy Tod wrote in message rver.com... Please forgive the dumb question.... A user enters daily data into a worksheet. I need to create a macro that inserts the daily values from that worksheet into a different worksheet based upon the value of a variable. The values from the daily worksheet are from 3 or 4 columns and about 20 rows. They will all need to placed into cells in one row on the other worksheet. For example... If variable equals 2 Daily Worksheet -- Monthly Worksheet A1 -- B2 A9 -- C2 D15 -- D2 C30 -- E2 I am completely lost. Please help! TIA, Tod |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Count letter"B" in one column based on unique value among duplicat | Excel Worksheet Functions | |||
change order of 5 letter word based on another cell containing 5 numbers | Excel Worksheet Functions | |||
How to replace column letter in refferences with a function using the old column letter? | Links and Linking in Excel | |||
How to replace column letter in refferences with a function using the old column letter? | Excel Worksheet Functions | |||
Sum cells based on a row variable and seperate column variable | Excel Worksheet Functions |