len & if function

ATHGR

New Member
Joined
Jun 19, 2023
Messages
2
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Mobile
  3. Web
Hi Guys,

I have a question about excel.

i would like to create a function with this criteria : when the wbs is GWV1P100275-01 until GWV1P100275-09 i would like to take in "I" cell the value GWV1P100275 , when the wbs is GWV1P100275-01-001 until GWV1P100275-01-009 i would like to take in "I' cell the value GWV1P100275-01 , when the wbs is GWV1P100275-02-001 until GWV1P100275-02-009 i would like to take in "I" cell the value GWV1P100275-02

1687169497115.png


thanks in advance!
 

Attachments

  • 1687169090124.png
    1687169090124.png
    30.7 KB · Views: 5

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hi & welcome to MrExcel.
How about
Excel Formula:
=IF(ISNUMBER(FIND("-",F2)),LEFT(F2,FIND("-",F2)-1),F2)
 
Upvote 1
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,822
Members
449,470
Latest member
Subhash Chand

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