Using an Excel Formula to Filldown

MurdochQuill

Board Regular
Joined
Nov 21, 2020
Messages
84
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I'm looking to filldown my formula using a formula (if that's possible). If anyone has knowledge on how to do this it would be really helpful.

Here's the example formula I'm looking to fill down using only in cell formula. Formula works alright as is.. but instead of having it bound to a strict range, I would like it to move dynamically.
I have a global called "Maxrows" which returns the dynamic amount of rows it should be applied to.

Excel Formula:
=IFERROR(IF(XLOOKUP(INT(MID(INDEX(G:G,ROW()),SEARCH(", ",INDEX(G:G,ROW()))+5,LEN(INDEX(G:G,ROW()))-SEARCH(", ",INDEX(G:G,ROW()))-10)), K:K,L:L,"",0)=0,"",XLOOKUP(INT(MID(INDEX(G:G,ROW()),SEARCH(", ",INDEX(G:G,ROW()))+5,LEN(INDEX(G:G,ROW()))-SEARCH(", ",INDEX(G:G,ROW()))-10)), K:K,L:L,"",0)),"")
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Data sample and explanation so that we don't have to (perhaps incorrectly) reverse engineer the existing formula?

You could try replacing INDEX(G:G,ROW()) with G$2:INDEX(G:G,Maxrows)) which may or may not allow it to spill as a dynamic array. That is the best I can do without more information and something to test on.
 
Upvote 0
I've tried to pick your formula apart, see if this works
Excel Formula:
=LET(r,G2:INDEX(G:G,MATCH("zzz",G:G)),IFERROR(1/(1/XLOOKUP(INT(MID(r,SEARCH(", ",r)+5,5)),K:K,L:L,"",0)),""))
 
Upvote 0
Thanks for the attempt.
Yes it's quite a long and convoluted formula.

What it achieves is this: Col F has data in it like the following, which is random but contains important data after ", ".
sdfhgfjhghfdj3234253345sgfh, 9999999. y

It pulls the "9999999" from the row the formula is on. It then matches the pulled number with Col M on the same row. If the data is a match, then return value in Col N on the same row.
Here's the original for clarification:
Excel Formula:
=IFERROR(IF(XLOOKUP(INT(MID(INDEX(F:F,ROW()),SEARCH(", ",INDEX(F:F,ROW()))+2,LEN(INDEX(F:F,ROW()))-SEARCH(", ",INDEX(F:F,ROW()))-4)), M:M,N:N,"",0)=0,"",XLOOKUP(INT(MID(INDEX(F:F,ROW()),SEARCH(", ",INDEX(F:F,ROW()))+2,LEN(INDEX(F:F,ROW()))-SEARCH(", ",INDEX(F:F,ROW()))-4)), M:M,N:N,"",0)),"")
 
Upvote 0
How about
Excel Formula:
=LET(Rng,F2:INDEX(F:F,MaxRows),Start,FIND(", ",Rng),Return,XLOOKUP(INT(MID(Rng,Start+2,LEN(Rng)-Start-4)),M:M,O:O,"",0),IF(Return=0,"",Return))
 
Upvote 0
Solution
How about
Excel Formula:
=LET(Rng,F2:INDEX(F:F,MaxRows),Start,FIND(", ",Rng),Return,XLOOKUP(INT(MID(Rng,Start+2,LEN(Rng)-Start-4)),M:M,O:O,"",0),IF(Return=0,"",Return))
Hi Fluff,

That's a really nice formula. Do you have any comprehensive sources on learning ways to use the =LET formula?
 
Upvote 0
Glad we could help & thanks for the feedback.
Do you have any comprehensive sources on learning ways to use the =LET formula?
Not really, but if you search the net I'm sure there will be plenty of sites giving some detail.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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