hey, how can I grab the middle number in this number string 01:30.5 (A1)
cell should = 30 (B1)
with the small and easy Excel-Formula possible?
hey, how can I grab the middle number in this number string 01:30.5 (A1)
cell should = 30 (B1)
with the small and easy Excel-Formula possible?
Last edited by QuantEdge; 08-18-2017 at 12:03 PM.
=MOD($A1,SEARCH(":",$A1,1)+1,2)
but probably the question will be more complex.
Notice my main language is not English.
I appreciate it, if you reply on my solution.
If you are satisfied with the solution, please mark the question solved.
You can add reputation by clicking on the star * add reputation.
thx oeldere.. but it does work! please give example sheet.
it states "You've entered too many arguments for this function."
Last edited by QuantEdge; 08-18-2017 at 12:17 PM.
It should be this:
=MID($A1,SEARCH(":",$A1,1)+1,2)
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
still does work! please share sheet
my sheet attached
Last edited by QuantEdge; 08-18-2017 at 12:40 PM.
Try this:
=SECOND(A1)
Make sure that B1 is set to general formatting.
Please stop asking people to share their sheets - it is you who should be doing that, as it is your data that is causing the issues.
AliGW, sorry about that but still does not work please check out my attached sheet!
Last edited by QuantEdge; 08-18-2017 at 12:47 PM.
Try this then.
=INT(A1*24*60*60)
Oh wait, this works with your example but not when there's min/hour portion.
Give me a sec.
Edit: this ought to do it.
=MOD(INT(A1*24*60*60),60)
Last edited by CK76; 08-18-2017 at 01:07 PM.
?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
― Robert A. Heinlein
yes translation error=MID($A1,SEARCH(":",$A1,1)+1,2)
QuantEdge
That is strange, since in your added file it does NOT work.thx oeldere.. but it does work!
But if it work, then the question is solved?
Last edited by oeldere; 08-18-2017 at 01:26 PM.
thx oeldere, that works nicely
now is there any way to grab the first number on the left?
I might suggest that the OP is a little misleading. The OP refers to the cell as a "number string" when the cell actually contains a time serial number (review this to see how Excel stores date/time values: http://www.cpearson.com/Excel/datetime.htm ).
Here's how I would probably do it:
1) Extract the minutes value first. This is easily accomplished using the MINUTE() function https://support.office.com/en-us/art...d-a84801a60589 =MINUTE(A2)
2) AliGW's SECOND() function would work for the seconds value, if Microsoft's programmers had programmed the function to handle fractional seconds. However, it seems to be programmed to return only integer seconds, so we need to do it differently. Recognizing that the number in column A is just a fraction of a day, multiply by 24*3600 to convert to total seconds, then subtract off the number of seconds taken up by the minute's number. =A2*24*3600-B2*60 (assuming you put =MINUTES(A2) in B2).
Originally Posted by shg
=left(a1,2)
thx guy's got it working now... I will * both of you... you save me a day of clicking...
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks