Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 464
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
automatically run a macro everyday Kam Excel Discussion (Misc queries) 6 December 12th 09 06:04 PM
MATCH function, with variable lookup_array St03mp Excel Programming 12 April 18th 08 01:50 PM
Match with Complex Lookup_array karlsven Excel Worksheet Functions 2 December 20th 07 08:18 AM
Macro to run everyday??? Don Guillett Excel Programming 1 January 17th 07 10:26 PM
any auto formula changing 1 - 31st everyday & multiply $975 Kelly Lim Excel Discussion (Misc queries) 15 July 31st 06 08:06 AM


All times are GMT +1. The time now is 02:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"