ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Using MID within a formula (https://www.excelbanter.com/excel-discussion-misc-queries/106363-using-mid-within-formula.html)

SamuelT

Using MID within a formula
 

Hi all,

I'm trying to create a VLOOKUP formula that incorporates the MID
worksheet function and am having a few problems. I'll try to explain
what's going on...

In one spreadsheet I have a list of projects that are identified by a
ID number called a TU Number. It looks like this: TU103250148. In
another I have a list of projects that are identified by an ID number
called a PIMS number. The PIMS number is basically the first five
numerical characters of the TU Number; it looks like this: 10325

I can use the MID function to extract the PIMS number from the TU
number: =MID(A2, 3, 5)

However, what I can't do is get the VLOOKUP function to run the MID
function before it looks at my list of TU numbers. I don't know if this
is even possible. Can anyone suggest how (and if) this can be done?

TIA,

SamuelT


--
SamuelT
------------------------------------------------------------------------
SamuelT's Profile: http://www.excelforum.com/member.php...o&userid=27501
View this thread: http://www.excelforum.com/showthread...hreadid=574103


Muhammed Rafeek M

Using MID within a formula
 
Without using MID function you can extract. try this one:

=VLOOKUP("??"&E1&"*",A1:B2,2,0)
A1:B200 - list of projects
E1: lookup value (TU Number)


"SamuelT" wrote:


Hi all,

I'm trying to create a VLOOKUP formula that incorporates the MID
worksheet function and am having a few problems. I'll try to explain
what's going on...

In one spreadsheet I have a list of projects that are identified by a
ID number called a TU Number. It looks like this: TU103250148. In
another I have a list of projects that are identified by an ID number
called a PIMS number. The PIMS number is basically the first five
numerical characters of the TU Number; it looks like this: 10325

I can use the MID function to extract the PIMS number from the TU
number: =MID(A2, 3, 5)

However, what I can't do is get the VLOOKUP function to run the MID
function before it looks at my list of TU numbers. I don't know if this
is even possible. Can anyone suggest how (and if) this can be done?

TIA,

SamuelT


--
SamuelT
------------------------------------------------------------------------
SamuelT's Profile: http://www.excelforum.com/member.php...o&userid=27501
View this thread: http://www.excelforum.com/showthread...hreadid=574103



Bob Phillips

Using MID within a formula
 
=INDEX(N1:N100,MATCH(PIMS,--MID(M1:M100,3,5),0))

where column M is the project ID, N is the column you want to extract.



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"SamuelT" wrote in
message ...

Hi all,

I'm trying to create a VLOOKUP formula that incorporates the MID
worksheet function and am having a few problems. I'll try to explain
what's going on...

In one spreadsheet I have a list of projects that are identified by a
ID number called a TU Number. It looks like this: TU103250148. In
another I have a list of projects that are identified by an ID number
called a PIMS number. The PIMS number is basically the first five
numerical characters of the TU Number; it looks like this: 10325

I can use the MID function to extract the PIMS number from the TU
number: =MID(A2, 3, 5)

However, what I can't do is get the VLOOKUP function to run the MID
function before it looks at my list of TU numbers. I don't know if this
is even possible. Can anyone suggest how (and if) this can be done?

TIA,

SamuelT


--
SamuelT
------------------------------------------------------------------------
SamuelT's Profile:

http://www.excelforum.com/member.php...o&userid=27501
View this thread: http://www.excelforum.com/showthread...hreadid=574103




SamuelT

Using MID within a formula
 

Many thanks Muhammed and Bob - both options solve the problem!


--
SamuelT
------------------------------------------------------------------------
SamuelT's Profile: http://www.excelforum.com/member.php...o&userid=27501
View this thread: http://www.excelforum.com/showthread...hreadid=574103



All times are GMT +1. The time now is 07:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com