Forum Discussion
Help with formula
Hello! If I'm trying create a formula that pulls data from one sheet into another. I want it to pull in data in column E if column B has a january date AND column C has the word discover in it, into another tab within the same workbook. The formula below works perfect but the only problem is it has to be only the word "discover" (yellow cells) in the cell, if it says "discover - food" (green cells) it doesn't pull. Is there a way to have the formula pull the data if the word "discover" shows in column C but with other words like in the green cells?
My current formula that kinda works: =INDEX('My ✓ing'!E:E,MATCH(1,(MONTH('My ✓ing'!B:B)=1)*('My ✓ing'!C:C="Discover"),0))
Pulling from this sheet below
Into this sheet in the same workbook. The yellow ones work because it just has discover, the green is not cause it has Discover - food. Is there a way to get it to search for the word discover and not necessarily match?
Thank you for any help!
Thank you so much! That seems to be working!
=INDEX('My ✓ing'!E:E,MATCH(1,(MONTH('My ✓ing'!B:B)=1)*(ISNUMBER(SEARCH("Discover",'My ✓ing'!C:C))),0))
This is the formula that worked for what I was trying to do. I tried doing this but couldn't get it to work right, I think I was missing some () or something, again thank you so much for your help!
5 Replies
- gracemillerOccasional Reader
Yes! You just need to adjust your formula to check if the word "Discover" appears anywhere within the cell in Column C, rather than matching it exactly.
✅ Updated Formula (with ISNUMBER(SEARCH(...)) for partial match):
=INDEX('My ✓ing'!E:E, MATCH(1, (MONTH('My ✓ing'!B:B)=1) * ISNUMBER(SEARCH("Discover", 'My ✓ing'!C:C)), 0))
🔧 Why it works:
- SEARCH("Discover", 'My ✓ing'!C:C) looks for the word "Discover" anywhere in the text.
- ISNUMBER(...) turns that into TRUE/FALSE depending on whether it's found.
- The rest of your formula stays the same to filter by January dates in column B.
⚠️ Important:
Because this is an array formula, you may need to:
- Press Ctrl + Shift + Enter if you're on Excel 2019 or earlier.
- On Excel 365 or Excel for the web, it should work as-is.
Let me know if you want it to return multiple results instead of just the first one!
- PeterBartholomew1Silver Contributor
This post is marked as solved but I enclose the following to provide an indication of what is possible using Excel 365.
- peiyezhuBronze Contributor
select * from My_✓ing;
select * from AccountInf;create temp table aa as
select Account,substr(f01,1,2) m,f01 `Date`,f04 Paid from My_✓ing a,AccountInf b where regexp(lower(b.key),lower(a.f02));
select * from aa;
cli_one_dim~temp.aa~2;
select * from aaunion;
create temp table bb as
select Account,m||'_'||属性 ColLab,数量 from aaunion;
select * from bb;
cli_create_two_dim~bb~ColLab~数量;
select * from bb_two_dim;
cli_stack_headers~bb_two_dim~(.+)_(.+); - OliverScheurichGold Contributor
=INDEX('My ?ing'!E:E,MATCH(1,(MONTH('My ?ing'!B:B)=2)*(ISNUMBER(SEARCH("Discover",'My ?ing'!C:C))),0))
This formula works in my sample file. The formula must be entered as an arrayformula with ctrl+shift+enter if someone works with legacy Excel such as Excel 2013. In the attached file i've added the formula in cell C11 in order to check if it works.
=IFNA(IF(C$2="Paid",INDEX('My ?ing'!$E:$E,MATCH(1,(MONTH('My ?ing'!$B:$B)=MONTH(C$1))*(ISNUMBER(SEARCH($B3,'My ?ing'!$C:$C))),0)), INDEX('My ?ing'!$B:$B,MATCH(1,(MONTH('My ?ing'!$B:$B)=MONTH(C$1))*(ISNUMBER(SEARCH($B3,'My ?ing'!$C:$C))),0))),"")
In the attached file i've added a formula that pulls dates and amount from the "My ?ing" sheet. The formula is in cell C3 and dragged across range C3:F6. In range C1:F1 are dates 01.01.2025 and 01.02.2025 that are formatted as "januar" and "februar".
- Countrygirl76Copper Contributor
Thank you so much! That seems to be working!
=INDEX('My ✓ing'!E:E,MATCH(1,(MONTH('My ✓ing'!B:B)=1)*(ISNUMBER(SEARCH("Discover",'My ✓ing'!C:C))),0))
This is the formula that worked for what I was trying to do. I tried doing this but couldn't get it to work right, I think I was missing some () or something, again thank you so much for your help!