Home 
Search 
Today's Posts 
#1




Trying to replace vlookup with xlookup and not using the indirect function
I have been using this for formula for awhile =VLOOKUP($A2,INDIRECT("'"&B$1&"'!$a$2:$b$12"),2,FA LSE) where Sheet 1 is a summary. In row 1 there are names which correspond to the sheets. So in B1 I have ATT and I have a sheet named ATT. In C1 I have GIS and I have a sheet named GIS.
On the summary sheet, in Cell a2 I have January, cell a3 February, a4 March and so on. On sheet T and GIS I have the same information but in cell B2 I have 50, in cell, b3 is 0, in cell b4 100. In essence I want to be able to use xlookup so that it will look at the sheet name (T and GIS) on the summary page and pull the info from the corresponding sheet name (T and GIS). Thanks in advance 
#2




Trying to replace vlookup with xlookup and not using the indirect function
I have been using this for formula for awhile
=VLOOKUP($A2,INDIRECT("'"&B$1&"'!$a$2:$b$12"),2,FA LSE) where Sheet 1 is a summary. In row 1 there are names which correspond to the sheets. So in B1 I have ATT and I have a sheet named ATT. In C1 I have GIS and I have a sheet named GIS. On the summary sheet, in Cell a2 I have January, cell a3 February, a4 March and so on. On sheet T and GIS I have the same information but in cell B2 I have 50, in cell, b3 is 0, in cell b4 100. In essence I want to be able to use xlookup so that it will look at the sheet name (T and GIS) on the summary page and pull the info from the corresponding sheet name (T and GIS). Thanks in advance Since "xlookup" isn't a builtin Excel function I assume it's a custom userdefined function (UDF). Post the code so we can see what it does now, and how it can be modified to do what you describe here!  Garry Free usenet access at http://www.eternalseptember.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion 
#3




Trying to replace vlookup with xlookup and not using the indirect function
Sorry, my bad! I found XLOOKUP() in 365 so I'd have to play with it to figure a
solution for you. Unfortunately, I have too much on my plate right now so hopefully our resident formula wizard will chime in to save the day!  Garry Free usenet access at http://www.eternalseptember.org Classic VB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion 
#4




Trying to replace vlookup with xlookup and not using the indirect function
George wrote:
.... =VLOOKUP($A2,INDIRECT("'"&B$1&"'!$a$2:$b$12"),2,F ALSE) ... In row 1 there are names which correspond to the sheets. So in B1 I have ATT and I have a sheet named ATT. In C1 I have GIS and I have a sheet named GIS. On the summary sheet, in Cell a2 I have January, cell a3 February, a4 March and so on. On sheet T and GIS I have the same information ... If A2:A13 is January to December in all these workbooks, it doesn't appear you need lookups at all. If the formula above were meant for Sheet1!B2, why not =INDIRECT("'"&B$1&"'!"&CELL("Address",B2)) ? If the ticker symbols in row 1 wouldn't be changing often, you could even use formulas to create formulas. B2: ="='"&B$1&"'!"&SUBSTITUTE(CELL("Address",B2),"$"," ") which is a formula which returns text which looks like a formula. Fill this right as far as needed. Then select the entire range of these formulas in row 2, copy, and paste special as values. That converts formulas producing text which looks like formulas to text constants which look like formulas. Then use Find & Replace to replace = with =, yes, replace the equal sign with itself. That effective enters these as formulas. Then fill that entire range down into rows 3 to 13. The idea is to avoid INDIRECT. If you don't have many of these other worksheets, there's another approach you could take. You have the worksheet names in row 1, I'll assume in B1:M1.. If you have XLOOKUP, you also have TEXTJOIN. B2: ="=CHOOSE(MATCH(B$1,$B$1:$M$1,0)"&TEXTJOIN(",'",0, INDEX($B$1:$M$1&"'!B2",0))&")" This is also a formula which results in text which looks like a formula. Copy, paste special as values, then press [F2] then [Enter]. Now fill B2 into B2:M13. Avoiding INDIRECT and OFFSET isn't necessary when there'd be no more than a few hundred formulas calling them, but it becomes necessary when there could be a few thousand formulas calling them. 
Reply 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Forum  
xlookup & paste a picture  Excel Programming  
Xlookup that returns variable sum data  Excel Discussion (Misc queries)  
vlookup with indirect function  Excel Discussion (Misc queries)  
VLOOKUP from closed file using INDIRECT function  Excel Worksheet Functions  
Indirect or Vlookup Function  Excel Worksheet Functions 