CELLA2:A Having below data
i want like in the cell B2:B as following![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
CELLA2:A Having below data
i want like in the cell B2:B as following![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
hi nur2544, try:
=MID(A2,FIND("^",SUBSTITUTE(A2," ","^",LEN(A2)-LEN(SUBSTITUTE(A2," ",""))))+1,LEN(A2))
copy down
Thanks, if you have clicked on the * and added our rep.
If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".
"Contentment is not the fulfillment of what you want, but the realization of what you already have."
Tips & Tutorials I Compiled | How to Get Quick & Good Answers
Try pasting this into cell B2:Formula:
Please Login or Register to view this content.
*******************************************************
HELP WANTED! (Links to Forum threads)
Trying to create reusable code for Custom Events at Workbook (not Application) level
*******************************************************
Hi,benishiryo
it works fine, but the problem is that when it gets blank cell or others value then it returns #VALUE!, how to remove it.
i have tried like below but results goes to "SS 1B" "CLASS 2B" "CLASS 2AC"
![]()
Please Login or Register to view this content.
Last edited by nur2544; 02-06-2013 at 11:45 PM.
Hello nur2544
You can turn off the #VALUE! in options. Otherwise try this formula in cell B2 and copy down:Formula:
Please Login or Register to view this content.
hi mc84excel
It works fine , although i get puzzle to see the big formula !. i always love small formula. as my requirement is fulfillment so i am going to use this..
how ever i have another post would you please look, here is the link
http://www.excelforum.com/excel-form...cell-b1-b.html
Last edited by nur2544; 02-07-2013 at 12:31 AM.
The secret to creating an impressively big formula is to work out what you want to achieve, break it down into small individual tasks and then work out the formulas for each task. Once you have all the small formulas working correctly, you copy and paste these little formulas into one big formula.
I'll explain how I solved your question:
First off, I had the formula I provided in my first postThis formula will return the last word in a cell taken from the last " " in the string.Formula:
Please Login or Register to view this content.
However you didn't want the #VALUE! message to appear. (This was because the cell had no " " spaces in it so the formula I supplied couldn't calculate). So I had to determine if the target cell had no " "s in it. I wrote this formula to return the number of " "s appearing in the target cell:Formula:
Please Login or Register to view this content.
As I expected, this formula returns an error if there are no " " in the target cell. I then altered this formula to read:(By using ISERR, the cell displays TRUE if the calculation will result in an error). So we now had a quick way of testing if the previous formula would show #VALUE!Formula:
Please Login or Register to view this content.
Now all I had to do was to combine both of these formulas into one single formula by means of an IF statement:
IF (enter the ISERR formula above to determine if cell has no " ") =TRUE then return "". If not then (enter the formula to find last word in cell).
Thus:Formula:
Please Login or Register to view this content.
I hope this helps to explain how the big formula was worked out.
(Actually I could have used: =IF(ISERR(original formula),"",(original formula)) However I wanted to give you a smaller formula so I used the FIND " " formula for the ISERR check instead).
Last edited by mc84excel; 02-07-2013 at 02:33 AM. Reason: clarify post
Hi
Another simple one!
Formula:
Please Login or Register to view this content.
Regards Kevin
Merged Cells (They are the work of the devil!!!)
hi mc84excel
Excellent explanation, many thanks….
Hi, Kevin UK
Thanks for discovering very smallest formula. It also works fine. however I appreciate all of you as it is not any issue at all as I know very well that everyone having deferent Logic & method , I am trying to learn how it can be done different way , and for this all of your logic Method I prefer . Thanks all of you who has given there valuable time for me . Take care..
@ benishiryo .total number of characters of the formula are 85
@ mc84excel .total number of characters of the formula are 119![]()
Please Login or Register to view this content.
@ Kevin UK .total number of characters of the formula are 49![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks