Check Partial value , if match then leave otherwise change

m_vishal_c

Board Regular
Joined
Dec 7, 2016
Messages
209
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi, i have two excel sheet in same workbook.

Sheet1 is having
AB
Comapy NameValue
abc ltd
def comms
ghiuniversal pty ltd
jklquantas

<colgroup><col><col></colgroup><tbody>
</tbody>

<colgroup><col><col></colgroup><tbody>
</tbody>


Sheet2 is having

AB
Compnayvalue
abc1
de2
ghi34
jkl4

<colgroup><col><col></colgroup><tbody>
</tbody>
I am going to apply vlookup on Sheet1 :- B3(abc ltd row) and get value from Sheet2 but it shows "#N/A"

Please advice me how can i get those value?

heaps in advance
 
My sheet1 has "abc def" and sheet 2 has "abc's comms"

when i run that above formula it gives me Blank
That is because this is a different circumstance to what you had presented before. In all your earlier examples the whole of the column A text from one sheet appeared at the start of the column A text in the other sheet.
For example
ABC
and
ABC LTD

In your latest example that is not the case. How do we know what should match and what shouldn't? For example, do these match (after all, they do both start with "A")?
ABC LTD
and
AZZOPARDI SERVICES
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
That is because this is a different circumstance to what you had presented before. In all your earlier examples the whole of the column A text from one sheet appeared at the start of the column A text in the other sheet.
For example
ABC
and
ABC LTD

In your latest example that is not the case. How do we know what should match and what shouldn't? For example, do these match (after all, they do both start with "A")?
ABC LTD
and
AZZOPARDI SERVICES

hi, thanks for replying. i truly respect your concern. but in this case word will be same.
for example
ABC LTD
and
ABC'S PRIVATE LTD
thanks
 
Upvote 0
My sheet1 has "abc def" and sheet 2 has "abc's comms"

That actually is Not a match...what Other scenarios would there be? Please list All possible scenarios.
 
Last edited:
Upvote 0
That actually is Not a match...what Other scenarios would there be? Please list All possible scenarios.


Hi, there are only 2 scenarios
(1) ABC LTD
and
ABC'S PRIVATE LTD
(2) A&B Ltd
and A & B ltd

Please guide me

thanks

 
Upvote 0
what Other scenarios would there be? Please list All possible scenarios.

Hi, there are only 2 scenarios
(1) ABC LTD
and
ABC'S PRIVATE LTD
(2) A&B Ltd
and A & B ltd

Use one of these updated formulas, the VLOOKUP and INDEX/MATCH has become Array formulas to be confirmed by CSE (Control, Shift, Enter)
The LOOKUP formula is normally entered.
Formulas copied down.


Book1
ABCD
1Company NameLOOKUPVLOOKUPINDEX/MATCH
2ABC LTD111
3XYZ222
4MMM444444444444
5DD444
6A&B Ltd999
Sheet1
Cell Formulas
RangeFormula
B2=IFERROR(LOOKUP(1,SEARCH(LEFT(A2,FIND(" ",A2&" ")-1),SUBSTITUTE(Sheet2!A$2:A$6," ","")),Sheet2!B$2:B$6),"")
C2{=IFERROR(VLOOKUP("*"&LEFT(A2,FIND(" ",A2&" ")-1)&"*",SUBSTITUTE(Sheet2!A$2:B$6," ",""),2,0)+0,"")}
D2{=IFERROR(INDEX(Sheet2!B$2:B$6,MATCH("*"&LEFT(A2,FIND(" ",A2&" ")-1)&"*",SUBSTITUTE(Sheet2!A$2:A$6," ",""),0)),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.



Book1
AB
1Compnayvalue
2ABC'S PRIVATE LTD1
3XYZ COMMISSION2
4MMM MARKETING4444
5DD COSTA4
6A & B ltd9
Sheet2
 
Upvote 0
Use one of these updated formulas, the VLOOKUP and INDEX/MATCH has become Array formulas to be confirmed by CSE (Control, Shift, Enter)
The LOOKUP formula is normally entered.
Formulas copied down.

ABCD
1Company NameLOOKUPVLOOKUPINDEX/MATCH
2ABC LTD111
3XYZ222
4MMM444444444444
5DD444
6A&B Ltd999

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B2=IFERROR(LOOKUP(1,SEARCH(LEFT(A2,FIND(" ",A2&" ")-1),SUBSTITUTE(Sheet2!A$2:A$6," ","")),Sheet2!B$2:B$6),"")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Array Formulas
CellFormula
C2{=IFERROR(VLOOKUP("*"&LEFT(A2,FIND(" ",A2&" ")-1)&"*",SUBSTITUTE(Sheet2!A$2:B$6," ",""),2,0)+0,"")}
D2{=IFERROR(INDEX(Sheet2!B$2:B$6,MATCH("*"&LEFT(A2,FIND(" ",A2&" ")-1)&"*",SUBSTITUTE(Sheet2!A$2:A$6," ",""),0)),"")}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



AB
1Compnayvalue
2ABC'S PRIVATE LTD1
3XYZ COMMISSION2
4MMM MARKETING4444
5DD COSTA4
6A & B ltd9

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet2


thanks a lot, it works perfectly. i have to apply above one of these formula on more than 4000 rows and it shows "Calculating (4 processor(s)) % " and file is stuck. it takes 3 to 4 mins to update entire file. and if i enter new data still it takes 3 to 4 mins to update. Is there any way i can avoid this much time. thanks
 
Upvote 0
Only advice I can give you is, try all 3 formulas and see which one works quickest for your file, and hope you're Not using Entire Column references (i.e. A:A, B:B, etc.), use a limited range larger than you need.
 
Upvote 0
Only advice I can give you is, try all 3 formulas and see which one works quickest for your file, and hope you're Not using Entire Column references (i.e. A:A, B:B, etc.), use a limited range larger than you need.

Hi, yes you are right. i was using entire column (i.e. A:A, B:B, etc.). it works good now without using entire column. but i have to change formula every time when i enter new data. is there any way that i do not need to change formula or this formula get total rows number in formula automatically. i do not need to change formula that's why i used (i.e. A:A, B:B, etc.). please guide me. thanks
 
Upvote 0
Just make the ranges big enough to cover any amount of data you are likely to have. You mentioned ab out 4,000 rows, so perhaps make the range 5,000 rows? .. or 10,000 if you think you might need that. Either way it would be much better than 1,000,000+ rows.
 
Upvote 0
Just make the ranges big enough to cover any amount of data you are likely to have. You mentioned ab out 4,000 rows, so perhaps make the range 5,000 rows? .. or 10,000 if you think you might need that. Either way it would be much better than 1,000,000+ rows.

Ok, got it. thanks for update me. much appreciate
 
Upvote 0

Forum statistics

Threads
1,215,527
Messages
6,125,337
Members
449,218
Latest member
Excel Master

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