Find value in string using VBA macro

chivao

New Member
Joined
Jan 28, 2014
Messages
1
1. I have a spreadsheet with approx 40 rows.
2. In column 1 I have different names in each row
Row1: CA-VOX-20-APPL-01
Row2: US-VOX-20-APPL-01-AP01
Row3: IN-VOX-20-APPL-01-AP02
Row4: IT-VOX30-APL
Row5: HU-VOX30-APS-AP01
Row6: CA-VOX-232345


3. I'm looping through this rows checking for different values, in column 2, 3, 4, etc depending on what is registred in column 1.


4. The names in column 1 is divided into 2 different categories.
categori 1 - is main deliverables like the one in Row 1 and 4.
categori 2 - is sub deliverables like the one in Row 2, 3 and 5. They are always named with the ending AP01 - APXX.


5. When the loop find a subdelivere (APxx) at the end, it triggers a different validation than if it find a main deliverable.


I Need a search a particular names in the row


Please help me regarding this
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Welcome chivao,

I am not sure what you need to do.
are you need formula to check if the names in column 1 are deliverables or sub deliverables?

if so then use this formula:
Rich (BB code):
=MID(A1,LEN(A1)-4,2)




AB
1IN-VOX-20-APPL-01-AP02 AP

<colgroup><col style="width: 30px; font-weight: bold;"><col style="width: 190px;"><col style="width: 64px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
B1=MID(A1,LEN(A1)-4,2)

<tbody>
</tbody>

<tbody>
</tbody>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,989
Messages
6,122,622
Members
449,093
Latest member
catterz66

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