do not find same result

majidsiddique

Board Regular
Joined
Oct 22, 2018
Messages
164
hi,
i have problem in Cell Value:
value of A1 cell:
[TABLE="width: 348"]
<tbody>[TR]
[TD="width: 348"]MD-5001219 - onyx - surgeryitem - 00016220228000
i use formula:
=LEFT(A1,FIND(" ",A1)-1)
result ok if change the cell value
but in
=RIGHT(A1,FIND(" ",A1)-1)
result would changed when i change the value of cell, why?
can anybody tell me.[/TD]
[/TR]
[TR]
[TD="width: 348"][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
simply to check both formula works same or not.
=LEFT(A1,FIND(" ",A1)-1)
result=
[TABLE="width: 173"]
<tbody>[TR]
[TD="width: 173"]MD-5001219 OK
=RIGHT(A1,FIND(" ",A1)-1)
[TABLE="width: 173"]
<tbody>[TR]
[TD="width: 173"]result:
6220228000
result shoud be like this = 00016220228000
kindly explaine me this[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
00016220228000 is a number.

Leading zeroes are dropped in Excel
To maintain the zeroes you'd have to do this

=TEXT(RIGHT(A1,FIND(" ",A1)-1),"00000000000000")
 
Upvote 0
This:

=RIGHT(A1,FIND(" ",A1)-1)

wont work for what you want. Try:

=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),99))
 
Upvote 0
thanks to Both,
Specially Steve Thanks
=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),99))
this works properly.

=TEXT(RIGHT(A1,FIND(" ",A1)-1),"00000000000000")
in this, i increase or decrease the value of last ZERO result same = [TABLE="width: 173"]
<tbody>[TR]
[TD="class: xl65, width: 173"]00006220228000[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Hi steve,special K-99 and all,
can you tell me general format of formula to detect value in inverted comma mentio " " any value of string
like "onyx" exclude remaining text print then change value of in "surgeryitem" remaining text print.
print as my wish exclude inverted comma,
Thanks.
 
Upvote 0
Maybe try to explain what you are after by giving examples of what you have and then what you think the result should be.
 
Upvote 0
very simple sir,
you insert any value of given TEXT in " " exclude from original TEXT:
eg:
MD-5001219 - onyx - surgeryitem - 00016220228000
"onyx" exclude remaining part of TEXT MD-5001219 - surgeryitem - 00016220228000
change i want insert in:
"5001219" exclude, remaining part of TEXT MD- - onyx - surgeryitem - 00016220228000
space also include in.
 
Upvote 0
This works provided none of the 'words' have spaces:

=SUBSTITUTE(TRIM(SUBSTITUTE(SUBSTITUTE(A1,"-"," "),B1,""))," "," - ")

where A1 contains the long string and B1 contains the string to exclude.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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