GO TO THE LAST DATA BASED ON 2 CELL DATA

wndncg

Board Regular
Joined
Mar 24, 2017
Messages
84
Office Version
  1. 2019
  2. 2016
  3. 2013
I have a working code just for 1 data but i need based on 2 data. ty mrexcel.

Dim Rng As Range
Set Rng = Range("A" & Rows.Count).End(xlUp).Offset(1)
Set wsCellVal = Sheets("TEMPLATE")
Set wsFIN = Sheets("FIN")
cv = wsCellVal.Range("E1")
Columns("A").Find(cv, After:=Rng, SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=False, _
SearchFormat:=False).Select
Application.Wait (Now + TimeValue("00:00:01"))
'wsFIN.Activate
'Call INSERT_ROW_SPECIFIC
'ActiveCell.EntireRow.Insert
 
If you mean your agency criteria that we were getting from the Template from Cell A1 is now in F1 then just change the A1 to F1 in this line.

Rich (BB code):
        strFormula = "iferror(Match(2, 1 / ((" & rngMth.Address & " = " & wsData.Range("E1").Address(External:=True) & ")*" _
                                        & "(" & rngAgency.Address & " = " & wsData.Range("F1").Address(External:=True) & "))),0)"
 
Upvote 0

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
If you mean your agency criteria that we were getting from the Template from Cell A1 is now in F1 then just change the A1 to F1 in this line.

Rich (BB code):
        strFormula = "iferror(Match(2, 1 / ((" & rngMth.Address & " = " & wsData.Range("E1").Address(External:=True) & ")*" _
                                        & "(" & rngAgency.Address & " = " & wsData.Range("F1").Address(External:=True) & "))),0)"
thanks sir! currently i need help also with this one.

 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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