Match Offset Return Row number

amolvijay

Board Regular
Joined
Nov 13, 2012
Messages
101
Office Version
  1. 365
Platform
  1. Windows
Hi Experts,
I am looking for a formula to return row number to automate Index formula.
Cell E1 gives me result "6". However in formula I wish +2 should be automated.

Formula should first look for value in column D in column A, then it should look for subsequent "Total" in column B and return appropriate value against "Total".

ABCDE
1ABCDPen3
2Pencil3
3Total6
4XYZPen4ABCD=INDEX(C:C,MATCH(D4,A:A,0)+2)=6
5Pencil3XYZ=INDEX(C:C,MATCH(D5,A:A,0)+3)=9
6Eraser2
Total9

<tbody>
</tbody>
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Maybe

E1 copied down
=IF(D1="","",INDEX(INDEX(C:C,MATCH(D1,A:A,0)):C$100000,MATCH("Total",INDEX(B:B,MATCH(D1,A:A,0)):B$100000,0)))

Hope this helps

M.
 
Upvote 0
HI Marcelo,

Formula is not working if Cell "D1" is on Sheet2 of the workbook, and formula referenced to data on Sheet1

Can you please help?

Maybe

E1 copied down
=IF(D1="","",INDEX(INDEX(C:C,MATCH(D1,A:A,0)):C$100000,MATCH("Total",INDEX(B:B,MATCH(D1,A:A,0)):B$100000,0)))

Hope this helps

M.
 
Upvote 0
Not clear.
Where are the values ABCD, XYZ that you showed in column D (post 1)? Sheet1 or Sheet2?
Is the first formula in E1 of sheet2?

M.
 
Upvote 0
I am trying to create a summary on sheet 2. So need to shift formula in E1 to Sheet2.

Updated formula as follows

=INDEX(INDEX(Sheet1!C:C,MATCH(D6,Sheet1!A:A,0)):C$100000,MATCH("Total",INDEX(sheet1!B:B,MATCH(D6,Sheet1!A:A,0)):B$100000,0))

which is not working. Please can u help.

Not clear.
Where are the values ABCD, XYZ that you showed in column D (post 1)? Sheet1 or Sheet2?
Is the first formula in E1 of sheet2?

M.
 
Last edited:
Upvote 0
Try (corrections in blue)
=INDEX(INDEX(Sheet1!C:C,MATCH(D6,Sheet1!A:A,0)):Sheet1!C$100000,MATCH("Total",INDEX(Sheet1!B:B,MATCH(D6,Sheet1!A:A,0)):Sheet1!B$100000,0))

If it doesn't work, try to provide data sample in Sheet1 and in Sheet2

M.
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,199
Members
449,072
Latest member
DW Draft

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