Using LET Function inside HYPERLINK Function

SanjayGMusafir

Well-known Member
Joined
Sep 7, 2018
Messages
1,462
Office Version
  1. 2021
Platform
  1. MacOS
Hi Experts
I was using following formula, which was working fine.

Excel Formula:
=HYPERLINK("#"&
IFERROR((IFS(DAY(TODAY())<=2,
ADDRESS(MATCH(1,INDEX((Banks[Dt]>=EOMONTH(TODAY(),-1))*(Banks[Acc]="CC ICICI SGM")*(Banks[Particulars]="Payment"),0,1),0)+5,COLUMN(Banks[Dt]),4,1),
TRUE,
ADDRESS(MATCH(1,INDEX((Banks[Dt]>=EOMONTH(TODAY(),0))*(Banks[Acc]="CC ICICI SGM")*(Banks[Particulars]="Payment"),0,1),0)+5,COLUMN(Banks[Dt]),4,1))),""),
"aSGM (02/20)"
&
LET(BNm,"CC ICICI SGM",LUNow,XLOOKUP(BNm,CCLimit[CCard],CCLimit[uNow]),LUTY,XLOOKUP(BNm,CCLimit[CCard],CCLimit[bThisYr]),
         IFS(LUNow<>"",LUNow,LUTY>0,"`",TRUE,"")))

Then I thought of making it shorter using LET function as below, and it stopped working. When I convert LET Function to Value using F9 key it works. But it isn't working as it is...

Excel Formula:
=HYPERLINK("#"&
LET(BNm,"CC ICICI SGM",BDt,XLOOKUP(BNm,CCLimit[CCard],CCLimit[bDt]),mDt,IFS(DAY(TODAY())<=BDt,EOMONTH(TODAY(),-1),TRUE,EOMONTH(TODAY(),0)),
          ADDRESS(MATCH(1,INDEX((Banks[Dt]>=mDt)*(Banks[Acc]=BNm)*(Banks[Particulars]="Payment"),0,1),0)+5,COLUMN(Banks[Dt]),4,1)),
          "iSGM (02/20)"
&LET(BNm,"CC ICICI SGM",LUNow,XLOOKUP(BNm,CCLimit[CCard],CCLimit[uNow]),LUTY,XLOOKUP(BNm,CCLimit[CCard],CCLimit[bThisYr]),
         IFS(LUNow<>"",LUNow,LUTY>0,"`",TRUE,"")))

I must be missing something very important that I'm unable to identify.

Please help
Thanks in Advance
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
I think I worked it out as below. Yet any better suggestions are always welcome, as there is always a scope for improvement.
Thanks

Excel Formula:
=LET(BNm,"CC ICICI SGM",
BDt,XLOOKUP(BNm,CCLimit[CCard],CCLimit[bDt]),
mDt,IFS(DAY(TODAY())<=BDt,EOMONTH(TODAY(),-1),TRUE,EOMONTH(TODAY(),0)),
LUNow,XLOOKUP(BNm,CCLimit[CCard],CCLimit[uNow]),
LUTY,XLOOKUP(BNm,CCLimit[CCard],CCLimit[bThisYr]),
HYPERLINK("#"&
ADDRESS(MATCH(1,INDEX((Banks[Dt]>=mDt)*(Banks[Acc]=BNm)*(Banks[Particulars]="Payment"),0,1),0)+5,COLUMN(Banks[Dt]),4,1),
"iSGM (02/20)")
&
IFS(LUNow<>"",LUNow,LUTY>0,"`",TRUE,""))
 
Upvote 0
Just in case anyone reaches this thread this is the actual solution. The formula in #2 and this one have very refined differences but effect functionality.

Excel Formula:
=LET(BNm,"CC SBI SGM",
          BDt,XLOOKUP(BNm,CCLimit[CCard],CCLimit[bDt]),
          mDt,IFS(AND(BDt>12,DAY(TODAY())>BDt),EOMONTH(TODAY(),1),AND(BDt<=12,DAY(TODAY())<=BDt),EOMONTH(TODAY(),-1),TRUE,EOMONTH(TODAY(),0)),
          LUNow,XLOOKUP(BNm,CCLimit[CCard],CCLimit[uNow]),
          LUTY,XLOOKUP(BNm,CCLimit[CCard],CCLimit[bThisYr]),
HYPERLINK("#"&
          ADDRESS(MATCH(1,INDEX((Banks[Dt]>=mDt)*(Banks[Acc]=BNm)*(Banks[Particulars]="Payment"),0,1),0)+5,COLUMN(Banks[Dt]),4,1),
          "sSGM (24/13)"
&
IFS(LUNow<>"",LUNow,LUTY>0,"`",TRUE,"")))
 
Upvote 0
Solution

Forum statistics

Threads
1,215,676
Messages
6,126,173
Members
449,296
Latest member
tinneytwin

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