-1

Main Sheet: https://docs.google.com/spreadsheets/d/1j71MW_rgbWFxaldl4j4Ww3a22QMRZpy_u2NFrI1jjak/edit?usp=sharing

Formula in C155

IMPORTRANGE Sheet: https://docs.google.com/spreadsheets/d/1ADudSHKhcuPtoep-S8IDXuHXrid4T6RTRrJQT5htZcE/edit?usp=sharing

I found a link with info to reverse the table for VLOOKUP from the bottom (https://infoinspired.com/google-docs/spreadsheet/vlookup-from-bottom-to-top-in-google-docs-sheets/), reason being I have multiple values of the same. I always want to pull the latest value, which is at the bottom.

Current Formula:

=IFERROR(IF(C149 <= TODAY(),VLOOKUP(VALUE(C149),IMPORTRANGE("1g7AtubscrhkP2y6A0Dk7JUXiqxPhkSwKWlpeG7RVBKI","'South Loop Sales Log'!$A:$K"),2,FALSE),""),"")

Date Values are in column A for IMPORTRANGE. Is there any way to implement this VLOOKUP formula to work with IMPORTRANGE also?

player0
  • 124,011
  • 12
  • 67
  • 124
Peter Chabot
  • 139
  • 1
  • 9
  • share a copy of your sheet pls – player0 Nov 25 '19 at 19:44
  • Updated with shareable links – Peter Chabot Nov 25 '19 at 20:01
  • Make sure to add input and expected output as **text table** (NOT as IMAGE) to the question. [Click here](https://webapps.stackexchange.com/a/161855/) to create a table easily. Adding such tables greatly increases your chances of getting a elegant answer, as **it is easier to copy/paste**. If you share spreadsheets, your question maybe closed, as questions here must be [self contained](https://meta.stackoverflow.com/a/260455). Your table should be a [mre].[Your email address can also be accessed by the public](https://meta.stackoverflow.com/questions/394304/), if you share Google files. – TheMaster Oct 18 '22 at 08:55

1 Answers1

1

try:

=IFERROR(IF(C$149 <= TODAY(), VLOOKUP(VALUE(C$149), ARRAY_CONSTRAIN(SORT({
 QUERY(IMPORTRANGE("1ADudSHKhcuPtoep-S8IDXuHXrid4T6RTRrJQT5htZcE", 
 "South Loop Sales Log!A3:K"), "where Col1 is not null", 0), 
 ROW(INDIRECT("A1:A"&COUNTA(IMPORTRANGE("1ADudSHKhcuPtoep-S8IDXuHXrid4T6RTRrJQT5htZcE",
 "South Loop Sales Log!A3:A"))))}, 12, 0), 99^99, 11), ROW(A2), 0), ), )

0

player0
  • 124,011
  • 12
  • 67
  • 124