Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
in column a , from a2 i have dates
in column b , from b2 , i have stock price in column c , from c2 , i have nasdaq values my data length will change ....may be 100 rows of data or 10000... what i m looking for is a macro do to : if values in cells in column c are 0 then in column d i want those dates in column e i want corr values from column b and in column F i want column c values.... sam |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No need to use a macro, use a formula
in D2 put int =if($c20,A2,"") in E2 =if($C20,B2,"") in F2 =if($C20,F2,"") then select D2:F2 and drag fill down the column with code Dim rng as Range set rng = Range(Cells(2,1),Cells(rows.count,1).End(xlup)) rng.offset(3,0).Resize(,3).formula = "=($C20,A2,"""")" ' to make hard coded values rather than formulas - optional 'rng.offset(0,3).Resize(,3).Formula = rng.offset(0,3).Resize(,3).Value Should do it. -- Regards, Tom Ogilvy "Sam" wrote in message m... in column a , from a2 i have dates in column b , from b2 , i have stock price in column c , from c2 , i have nasdaq values my data length will change ....may be 100 rows of data or 10000... what i m looking for is a macro do to : if values in cells in column c are 0 then in column d i want those dates in column e i want corr values from column b and in column F i want column c values.... sam |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
need help to update macro to office 2007 macro enabled workbook | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) |