Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
create a macro with the match lookup_array is changing everyday
Dear all,
I have a problem to create a macro bcos my data for lookup_array will be add up everyday. Sub Macro1() ActiveCell.FormulaR1C1 = "=MATCH(RC[1],R1C[2]:R10C[2],0)" End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
create a macro with the match lookup_array is changing everyday
Try
ActiveCell.FormulaR1C1 = "=MATCH(RC[1],C[2],0)" OR Dim lngRow As Long lngRow = Cells(Rows.Count, ActiveCell.Offset(, 2).Column).End(xlUp).Row ActiveCell.FormulaR1C1 = "=MATCH(RC[1],R1C[2]:R" & lngRow & "C[2],0)" -- Jacob (MVP - Excel) "Asraf" wrote: Dear all, I have a problem to create a macro bcos my data for lookup_array will be add up everyday. Sub Macro1() ActiveCell.FormulaR1C1 = "=MATCH(RC[1],R1C[2]:R10C[2],0)" End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
create a macro with the match lookup_array is changing everyday
When you record your macro, instead of selecting C1:C10, Click the column Id
at the top of the column to select the entire column for the Lookup_Array. -- Regards, OssieMac "Asraf" wrote: Dear all, I have a problem to create a macro bcos my data for lookup_array will be add up everyday. Sub Macro1() ActiveCell.FormulaR1C1 = "=MATCH(RC[1],R1C[2]:R10C[2],0)" End Sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
create a macro with the match lookup_array is changing everyday
Use a Dynamic Named Range
http://www.ozgrid.com/Excel/DynamicRanges.htm -- Regards Dave Hawley www.ozgrid.com "Asraf" wrote in message ... Dear all, I have a problem to create a macro bcos my data for lookup_array will be add up everyday. Sub Macro1() ActiveCell.FormulaR1C1 = "=MATCH(RC[1],R1C[2]:R10C[2],0)" End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
automatically run a macro everyday | Excel Discussion (Misc queries) | |||
MATCH function, with variable lookup_array | Excel Programming | |||
Match with Complex Lookup_array | Excel Worksheet Functions | |||
Macro to run everyday??? | Excel Programming | |||
any auto formula changing 1 - 31st everyday & multiply $975 | Excel Discussion (Misc queries) |