I NEED HELP for translate index/match function into vba code

Vanessa16

New Member
Joined
Jan 26, 2019
Messages
1
Hi, anyone please me save :(:(

how do i translate this to a vba code
=INDEX('16090540'!D2:D296,MATCH(MAX('16090540'!N2:N296),'16090540'!N2:N296,0))

what i have done is
test = Application.WorksheetFunction.Index(Sheets("16090540").Range("D2:D296"),Application.WorksheetFunction.Match(Application.WorksheetFunction.Max(Sheets("16090540").Range("N2:N296"),Sheets("16090540").Range("N2:N296"),0))

But I keep getting an error, may i know whats wrong with it?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi,

The quickest solution for you ... is to turn you your macro recorder ...

and type in your formula ... :wink:

Hope this will help
 
Upvote 0
Hi & welcome to MrExcel.
You are missing a ) from the Max function.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top