Need to return all values, using index & Match

winstela

New Member
Joined
Feb 24, 2019
Messages
28
Office Version
  1. 2016
Platform
  1. Windows
Good Morning,

I have 2 issues that I need help with

1.

I am trying to create a template that has headers in row 1 and formula in row 2 columns A to G
then when I paste data into the worksheet, the formula will copy down.

In Col F I am using the formula below to lookup the manufacture date against a sales order line.

Sometimes the manufacturing date has to be spread out over several days, how do I change the formula below to get the latest date.

Im looking up the sales order in Column A and matching that with the Col A on the MFG tab to return the value of Col J on the MFG


Code:
=IFERROR(INDEX(MFG!J:J,MATCH(A2,MFG!A:A,0)),"-")

2.

I am also using a worksheet change event to copy fil down the formula when changes are made to col H, if the formula has to be entered as an array, will the code below work

Code:
Private Sub Worksheet_Change(ByVal Target As Range)





If Target.Columns.CountLarge > 55 Then
Exit Sub
End If
Application.ScreenUpdating = False
If Not Intersect(Target, Columns("H")) Is Nothing Then  
Range("A2:G2").AutoFill Destination:=Range("A2:G" & Cells(Rows.Count, "H").End(xlUp).Row)


End If


Application.ScreenUpdating = True


End Sub

All help appreciated
Thanks
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hi I have manged to sort using

Code:
{[TABLE="width: 94"]
<tbody>[TR]
  [TD="class: xl63, width: 94"]=IFERROR(INDEX(MFG!J:J,MATCH(A2,MFG!A:A,0)+COUNTIF(MFG!A:A,A2)-1),"-")}[/TD]
[/TR]
</tbody>[/TABLE]

and the vba code works fine

Thanks
 
Upvote 0
The curly bracket should be infront of the = sign
 
Upvote 0

Forum statistics

Threads
1,203,115
Messages
6,053,590
Members
444,674
Latest member
DWriter9

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