Question about LET function

jelmer123456

New Member
Joined
Mar 3, 2021
Messages
16
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a formula with the LET function from this forum. I used it in a file and it worked fine, but now in a new file its having some issues. The first A to G works fine, but after that most values are placed some rows to the left. It should fill in the data if the text in row 1 matches which it does in the first part. Also it fills in zeroes when empty, while before it used to be empty (it should be empty)
Printscreens:
1622627671391.png


1622627765891.png


I tried uploading a mini sheet but it said I had to many cells selected (above 3000) while I had ~2000 selected, so if u know what causes that I can upload a mini sheet if needed.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
We don't need to see more than a small sample of the cells - I'd say 2000 was probably far too many.
 
Upvote 0
How about this: (A to AC will get filtered with kutools as a printable files based on colum D)
test file mrexcel.xlsx
ABCDEFGHIJKLMNOPQRSTVYACCACBCCCDCECFCGCHCICJCKCLCMCNCOCPCQCRCSCTCUCVCWCXCYCZDADBDCDDDEDFDGDHDI
1site_idunit_idsection_iddrawing_idstream_idleak_equipmentleak_sourceold_ppm_valueproject_idppm_valuesystemidequipmentequipment_typesourcepositionsizeunit_of_measureequipment_locationsource_locationaccess_levelinsulatedaccessrec_idexport_idsite_idunit_idsection_iddrawing_idstream_idleak_equipmentleak_sourceprotocolsystemidequipmentequipment_typesourcepositionsizeunit_of_measureequipment_locationsource_locationlineaccess_levelremarkmemoisolatedvery_bigblind_requestcorrosionaccessaccess_accesiblemanufactureryearhistory_date
2FTL*NONE*NONE330-0055-0023STR0101100FLBLFL010IN000000AC19951FTL*NONE*NONE330-0055-0023STR01011PSFLBLFL10IN00000ACTRUE2020#####
3FTL*NONE*NONE330-0055-0023STR0102100FLBLFL06IN000000AC19961FTL*NONE*NONE330-0055-0023STR01021PSFLBLFL6IN00000ACTRUE2020#####
inquiry (31)
Cell Formulas
RangeFormula
A2:Z38A2=LET(Fltr,FILTER(CC2:DQ38,COUNTIF(A1:AD1,CC1:DQ1)),Sorted,SORTBY(FILTER(CC2:DQ38,COUNTIF(A1:AD1,CC1:DQ1)),MATCH(FILTER(CC1:DQ1,COUNTIF(A1:AD1,CC1:DQ1)),A1:AD1,0)),IF(ISBLANK("Sorted"),"",Sorted))
Dynamic array formulas.
Named Ranges
NameRefers ToCells
'inquiry (31)'!_FilterDatabase='inquiry (31)'!$A$1:$AC$1A2
'inquiry (31)'!Print_Area='inquiry (31)'!$A$1:$AC$8270A2
'inquiry (31)'!Print_Titles='inquiry (31)'!$1:$1A2
 
Upvote 0
Why do you have quotes round Sorted in this part:

Excel Formula:
ISBLANK("Sorted")

(The word "Sorted" can't be blank!)
 
Upvote 0
Why do you have quotes round Sorted in this part:

Excel Formula:
ISBLANK("Sorted")

(The word "Sorted" can't be blank!)
No idea, but deleting the quotations marks fixed the random 0's so thats one problem fixed, thanks :)
 
Upvote 0
In the file where it does work, do you have any headers in the result table that are not in the source table? I think those would be the source of your problem, looking at the formula.
 
Upvote 0
Both files use the same source table and the file where it does work has more headers than this one. From my understanding from when I got the formula it would look for corresponding headers and copy the data thats under it from the source to the result table.
 
Upvote 0
As far as I can see (and I admit I haven't tested it) it will only return data from matching columns, but it doesn't leave gaps for columns that don't match, so your data won't line up properly after the first header that isn't in the source data.
 
Upvote 0
As far as I can see (and I admit I haven't tested it) it will only return data from matching columns, but it doesn't leave gaps for columns that don't match, so your data won't line up properly after the first header that isn't in the source data.
Looking at the order from both the source and result this makes sense. No idea how i'm gonna fix this though I didn't make the formula myself.
 
Upvote 0
Try something like this?

Excel Formula:
=LET(Data,INDEX(CC2:DQ38,SEQUENCE(37),MATCH(A1:AD1,CC1:DQ1,0)),IF(COUNTIF(CC1:DQ1,A1:AD1)>0,IF(Data="","",Data),""))
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,607
Members
449,090
Latest member
vivek chauhan

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