Return a value based on a substring from a cell in Google Sheets

Michelleaneous

New Member
Joined
Feb 16, 2024
Messages
13
Office Version
  1. 365
Platform
  1. Windows
How to return the "Ship From" in Cell B2 based from the data in another tab with a substring criteria in Col A (currently listed in Col E/F)

1708684353933.png
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
had a play on google sheets - index/match with a right should work
=index(Sheet2!B:B,match(right(A2,3),Sheet2!A:A,0))
however as the supplier maybe any length of character

=index(Sheet2!B:B,match(right(A2,len(A2)- search("-",A2)),Sheet2!A:A,0))
not sure if this links to google sheets


heres is the excel version

Untitled spreadsheet.xlsx
ABCD
1
21234-abccounty-abcabc
34567-deftown-def
Sheet1
Cell Formulas
RangeFormula
D2D2=RIGHT(A2,LEN(A2)- SEARCH("-",A2))
B2:B3B2=INDEX(Sheet2!B:B,MATCH(RIGHT(A2,LEN(A2)- SEARCH("-",A2)),Sheet2!A:A,0))
Press CTRL+SHIFT+ENTER to enter array formulas.


Untitled spreadsheet.xlsx
AB
1abccounty-abc
2deftown-def
Sheet2
 
Upvote 0
ok, so i thought i had shared public
i have answered your share request and also
made public
see if that works now

not used google sheets for years - sorry
 
Upvote 1
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,169
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