PDA

View Full Version : Help needed: Vlookup formula with a dynamic range



khaledocom
03-26-2019, 09:25 AM
Good evening gents,

I woud like t have a dnamic range vlookup formula as shown in the attached file.

Thankful

大灰狼1976
03-26-2019, 06:15 PM
Hi khaledocom!

=IF(ISERROR(VLOOKUP("O",INDIRECT("$D$2:$D$"&LOOKUP(2,1/(D:D<>""),ROW(D:D))),1,0)),"P","O")
Or

=IF(COUNTIF(INDIRECT("$D$2:$D$"&LOOKUP(2,1/(D:D<>""),ROW(D:D))),"O")>0,"O","P")

大灰狼1976
03-27-2019, 01:50 AM
Sorry, made a mistake.
Determine the last row of column C instead of column D.

=IF(COUNTIF(INDIRECT("$D$2:$D$"&LOOKUP(2,1/(C:C<>""),ROW(C:C))),"O"),"O","P")


--Okami

khaledocom
03-28-2019, 04:30 AM
Thanks a lot my dear friend but it is not achieving my request.

大灰狼1976
03-28-2019, 05:53 PM
Are you sure it's not the result you want, see the annex.



Okami

khaledocom
03-29-2019, 10:14 AM
Thanks Okami,
Last me I mistyped your formula.
Appreciate it.