Return value of characters in a string using known start & end positions

suprsnipes

Active Member
Joined
Apr 26, 2009
Messages
434
Hi,

I'm not quite sure if this is possible but using the Find feature I have identified the characters in a string where I would like to return the numbers in between.

For example in A1 & A2 I have;
Start 6 End 8; return character in position 7 in A3
Start 6 End 9; return character in positions 7 & 8 in A3
Start 6 End 8; return character in position 7 in A3

Appreciate your help,
suprsnipes
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hi,

I'm not quite sure if this is possible but using the Find feature I have identified the characters in a string where I would like to return the numbers in between.

For example in A1 & A2 I have;
Start 6 End 8; return character in position 7 in A3
Start 6 End 9; return character in positions 7 & 8 in A3
Start 6 End 8; return character in position 7 in A3

Appreciate your help,
suprsnipes
Sounds like you need something like this...

=MID(cell_reference, start_number, number_of_characters)

For example:

A1 = ABCDEFGHIJ

=MID(A1,6,1) = F
=MID(A1,6,2) = FG
=MID(A1,6,3) = FGH
 
Upvote 0
I want to fill a formula down around 1000 rows. It may be one character it could be up to 4, so the MID function is not what I am after. Is there any other way?
 
Upvote 0
MID is almost certainly what you want but how are you calculating Start and End?
 
Upvote 0
I'm not sure why MID would not be what you were after.

Assuming your string is in D1:

=MID(D1,A1+1,A2-A1-1)
 
Upvote 0
I want to fill a formula down around 1000 rows. It may be one character it could be up to 4, so the MID function is not what I am after. Is there any other way?
Post SEVERAL representative samples of your data and tell us what results you expect.
 
Upvote 0
I am using for the start
In A1.
Code:
FIND("I",D1)
And End
In B1.
Code:
FIND("N",D1)

Sorry I've made a mistake.

The example should be as follows;

For example in A1 & B1 I have;
Start 6 End 8; return character in position 7 in C1
Start 6 End 9; return character in positions 7 & 8 in C1
Start 6 End 8; return character in position 7 in C1
 
Last edited:
Upvote 0
OK, If you change my formula to be C1 instead of D1, does that solve your problem?
 
Upvote 0
Wow, thanks guys for your help. I used the following from HOTPEPPER.

Code:
=MID(D1,A1+1,A2-A1-1)

Didn't know MID function could do that.

:bow:
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,866
Members
452,948
Latest member
UsmanAli786

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