datastudent
Board Regular
- Joined
- Sep 7, 2021
- Messages
- 91
- Office Version
- 365
- Platform
- Windows
Hi,
I recorded a Macro adding a formula in my Sheet. However when I tried to run it through VBA its not working and getting an error. Please help me troubleshoot.
Formula:
=LET(b,Note!$F$2:$F$80,c,Note!$E$2:$E$80,mf,{"Mobile","Fixed"},XLOOKUP(A2,c,b,XLOOKUP(TRUE,ISNUMBER(SEARCH(mf,A2)),mf,"",0),0))
Range("C2").Formula2R1C1 = _
"=LET(b,Note!R2C6:R80C6,c,Note!R2C5:R80C5,mf,{""Mobile"",""Fixed""},XLOOKUP(RC[-2],c,b,XLOOKUP(TRUE,ISNUMBER(SEARCH(mf,RC[-2])),mf,"""",0),0))"
Range("C3").Select
I recorded a Macro adding a formula in my Sheet. However when I tried to run it through VBA its not working and getting an error. Please help me troubleshoot.
Formula:
=LET(b,Note!$F$2:$F$80,c,Note!$E$2:$E$80,mf,{"Mobile","Fixed"},XLOOKUP(A2,c,b,XLOOKUP(TRUE,ISNUMBER(SEARCH(mf,A2)),mf,"",0),0))
Range("C2").Formula2R1C1 = _
"=LET(b,Note!R2C6:R80C6,c,Note!R2C5:R80C5,mf,{""Mobile"",""Fixed""},XLOOKUP(RC[-2],c,b,XLOOKUP(TRUE,ISNUMBER(SEARCH(mf,RC[-2])),mf,"""",0),0))"
Range("C3").Select