Excel formula find address of the last cell in a row/column of values/text which contains same value/text

FATMIR

New Member
Joined
Jul 19, 2018
Messages
4
a have this case:
AB
10150358100
20150358200
30150358250
4015035830
5016000180
60160001120
7016000190

<tbody>
</tbody>

I have to find the address of the cell in B column which is related with the last cell in a row (A) which contains the cells with the same text/value.
In the table case above the outcome should be B4, if the condition is to search for "0150358", or B7, if the condition will be to search for "0160001".
Thank you in advance
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Welcome to Mr Excel forum

Try


A
B
C
D
E
1
150358​
100​
Criteria​
Result​
2
150358​
200​
150358​
B4​
3
150358​
250​
160001​
B7​
4
150358​
30​
5
160001​
80​
6
160001​
120​
7
160001​
90​
8

Formula in E2 copied down
="B"&LOOKUP(2,1/(A$1:A$7=D2),ROW($A$1:$A$7))

M.
 
Upvote 0
Now i'm trying to incorporate the founded address with the formula: ="B"&LOOKUP(2,1/(A$1:A$7=D2),ROW($A$1:$A$7)) which result was B4, in the formula for calculation of NPV :which should be =NPV(C1,B1:B4).
I'm trying to find by formula this B4:
=NPV(C1,B1:(
"B"&LOOKUP(2,1/(A$1:A$7=D2),ROW($A$1:$A$7))), but it is not working. the formula does not recognise the outcome address from the lookup formula, to be used in the row selection : B1:B4.
Maybe i'm completely out way. I have to use NPV formula with the condition of the selection of the cash flow, according to the condition 150358 last in the row.
 
Upvote 0
You need something like this


A
B
C
D
E
F
G
H
1
Code​
Value​
Rate​
Criteria​
FirstRow​
LastRow​
NPV​
2
150358​
100​
10%​
150358​
2​
5​
$464,52​
3
150358​
200​
160001​
6​
8​
$239,52​
4
150358​
250​
5
150358​
30​
6
160001​
80​
7
160001​
120​
8
160001​
90​
9

Rate in D2

Criteria in column E

Formula in F2 copied down
=MATCH(E2,A:A,0)

Formula in G2 copied down (assumes the codes are grouped)
=F2+COUNTIF(A:A,E2)-1

Formula in H2 copied down
=NPV(D$2,INDEX(B:B,F2):INDEX(B:B,G2))

Hope this helps

M.
 
Upvote 0

Forum statistics

Threads
1,214,956
Messages
6,122,465
Members
449,085
Latest member
ExcelError

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