Lookup value based on multiple criteria where one is searching a cell for specific text string

alex0182828

Board Regular
Joined
Jun 20, 2012
Messages
88
Office Version
  1. 365
Platform
  1. MacOS
I need to change the below forumla so instead of checking if there are any cells in order_adjustment!G:G that equal "Added Manually" so that it checks if they contain the text string "Added Manually"

The Cell AM5 just contains an order ID. The formula is looking in the order adjustment worksheet for specific order ID in column B and then a row in column F that contains a cell with the text 'Added Manually'. If this doesnt appear in the order adjustment worksheet formula is returning blank otherwise it returns the value in column H.

In theory there sound not be two duplicate row in column F for the same order containing the text 'Added manually' but it might be nice to have a formula that could deal with this edge case but i would like to understand how to so the searching instead of direct match first :)

Excel Formula:
=IF(IFNA(INDEX(FILTER(order_adjustment!H:H, (order_adjustment!C:C=AM5)*(ISNUMBER(SEARCH("Added Manually", order_adjustment!G:G)))), 1)
,"TRUE")="TRUE","",CONCATENATE("Order has adjustment of £",XLOOKUP(1,(order_adjustment!C:C=AM5)*(order_adjustment!G:G="Added Manually"),order_adjustment!H:H),"<br>"))

Screenshot 2024-03-08 at 15.43.26.png
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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