I want to combine numerical value and text (commenting on an value) - excel

I’ve a value eg: 3,100,000.24 in a cell, which I want to mention in comments automatically.
Eg: Increase in xx by 3.1MM
I tried using formula:
="Decrese in X by "&TEXT(J22,"[<999950]0.0,"K";[<999950000]0.0,,"M";0.0,,,"B"")
However, it gives me an error.
Can someone please help me on this.
Issue is related to excel.
Thanks in advance..

Not sure if I get what you want to do, but in TEXT(J22,"[<999950]0.0,"K" the quotes before K matches the one before [<999950]0.0,, closing the text and leaving your K is loose in the formula. Similar thing with the M and B.

Related

Result not correct when using if, left and search in excel

I am trying to extract the text to the right of a character pattern of form -201*-*- in excel (I also tried using Access, but the issue persists).
For example, in the text:
EP-005-FI6-2012-1-124-000000-1
I want to extract the number 124; the following formula works:
=LEFT(RIGHT(C1,SEARCH("-201*-*-",C1)+1),3)
124
However, when i apply the exact same formula to extract169 from the text below:
NAATS-MG-D6-2017-1-169-070000-1
The formula returns a completely different result:
=LEFT(RIGHT(C540495,SEARCH("-201*-*-",C540495)+1),3)
-16
The pattern is the same, but the results is completely differnt.
My dataset is too big to go row by row fixing the issue...
Seems to be a simple problem, but i can't get this working...
Any thoughts?
Thank you
Your RIGHT() is wrong. Use:
=LEFT(MID(C1,SEARCH("-201?-?-",C1)+8,9999),3)

Excel If statements brackets issue

I am trying to create an IF statement in Excel, in order to group some data into 3 distinct variables. For the purpose of this attempt, I simply want to classify words into people names.
Now, the screenshot shows a simplified version of what I am trying to do, as I am unable to post photos of the full data for security reasons.
As the shot shows, the brackets before F7 and after Joe are in red, but am very confused why. Any help would be appreciated.
Thomas
Excel colour codes brackets when in Edit / Enter mode, to make it easier to identify matching pairs.
You can do it like this:
=IF(ISNUMBER(MATCH(F7,{"Tom","Ed","Joe"},0)),"names","Not names")
Your formula wasn't correct because you didn't have logical values in OR() and the red color was due to Excel pair coloring - not because of error.
To make your formula work as is it would look like:
=IF(OR(F7="Tom",F7="Ed",F7="Joe"),"names","Not names")

Excel IF(OR) - two OR's formula works but three doesn't?

I can get a two possibility formula to work but not a three. I thought it would just be adding a comma for another term then adding a comma for a value. Please can anyone tell me why its not working?
Working one:
=IF(OR(C6="buy", C6="hold"),(F5*(D6+1)),(E5*(D6+1)))
Not Working:
=IF(OR(C6="buy", C6="hold", c6="sell"),(F5*(D6+1)),(E5*(D6+1)),0)
After reading your problem description couple of times over I think you need below formula:
=CHOOSE(MATCH(C6,{"buy","hold","sell"},0),(F5*(D6+1)),(E5*(D6+1)),0)
In your second formula you have two parts (E5*(D6+1)) and 0 for the Value is False section, this version will work: =IF(OR(C6="buy", C6="hold", C6="sell"),(F5*(D6+1)),(E5*(D6+1)))

Replacing a section of the data in a cell for thousands of excel data

I have a large spreadsheet with column data like:
ABC:1:I.0
ABC:1:I.1
ABC:1:I.2
ABC:1:I.3
ABC:2:I.0
ABC:2:I.1
ABC:2:I.2
ABC:2:I.3
ABC:3:I.0
ABC:3:I.2
ABC:3:I.3
ABC:4:I.0
ABC:4:I.1
ABC:4:I.2
ABC:4:I.3
ABC:5:I.0
ABC:5:I.1
ABC:5:I.2
ABC:5:I.3
ETC.
I need to replace the above with the following:
ABC:I.Data[1].0
ABC:I.Data[1].1
ABC:I.Data[1].2
ABC:I.Data[1].3
ABC:I.Data[2].0
ABC:I.Data[2].1
ABC:I.Data[2].2
ABC:I.Data[2].3
ABC:I.Data[3].0
ABC:I.Data[3].2
ABC:I.Data[3].3
ABC:I.Data[4].0
ABC:I.Data[4].1
ABC:I.Data[4].2
ABC:I.Data[4].3
ABC:I.Data[5].0
ABC:I.Data[5].1
ABC:I.Data[5].2
ABC:I.Data[5].3
ETC.
Here is a sample of the data, most of the data follows a similar format with the exception of the naming "ABC", which can vary in size, so it might be "ABCD" and also with the exception of the letter "I", it can be "O" as well. Also, some might be missing some values such as ABC:3:I.1 which is missing from the data. I am not too familiar with excel formulas or VBA code. Does anyone know how to do this? I have no preference on which method it has to be done in as I don't mind learning some VBA code if someone provides me with a VBA solution.
I was thinking of using some sort of loop along with some conditional statements.
Thanks!
Please try:
=LEFT(F11,FIND(":",F11))&MID(F11,FIND(":",F11,6)+1,1)&".Data["&MID(F11,FIND(":",F11,2)+1,1)&"]."&RIGHT(F11,1)
copied down to suit, assuming placed in Row11 and your data is in ColumnF starting in Row11.
Curiosities:
When this A was first posted it attempted to address only the tabulated example input and output. I temporarily deleted that version while addressing that what was in the table as ABC might at times be ABCD and that what was I might at times be O.
OP has posted an answer that I edited to make no visible change but which shows as the deletion of two characters. A copy of the OP’s formula exhibited a syntax error prior to my edit.
OP suggested an edit to my answer but this was rejected by the review process. As it happens, I think the edit suggestion was incorrect.
I have edited my answer again to include these ‘curiosities’ and to match the cell reference used by the OP in his answer.
=LEFT(A1,SEARCH(":",A1)) & MID(A1, SEARCH(".",A1)-1, 2) &
"Data[" & MID(A1,SEARCH(":",A1)+1,1) & "]" & RIGHT(A1,2)
With the help of pnuts I was able to come up with my own solution:
=LEFT(F11,LEN(F11)-5)&MID(F11,LEN(F11)-2,2)&"Data["&MID(F11,LEN(F11)-4,1)&"]"&RIGHT(F11,2)
My solution works based on the fact that the length of the last six values in the string ABC:1:I:0 will always be the same in size for all the data I have, hence you see LEN(F11)-some number in my code. The only part of the string that changes in size is the first part, in this case ABC which can also be ABCDEF, etc.
If you'd like to use formulas rather than VBA, an easy option is to split the data into 4 columns, using the Text To Columns option - first split using the colon as a delimiter, then using a full-stop / period as a delimiter.
Once you have 4 columns of data (one for each block), you can use the Concatenate function to join them and add in the extra characters: =CONCATENATE(A1,":",C1,".","Data[",B1,"].",D1)
This should still work if you have extra / alternative characters (eg ABCD instead of ABC), as long as you have the same delimiters, but obviously you'd need to test to make sure.

How can I parse a column by a number of characters?

I want to pull the last two text terms that are found on either side of the last period but I'm not sure how to parse this out of my excel sheet easily. If I can find a formula to find everything Right of the 2nd period from the right that would be great --- But I haven't come across any way to do this yet. If someone with more experience in Excel could help I would greatly appreciate it!
Examples of what I have: (x 20000 records)
104.526.737.me.com
102.sub-62649-42.httm.com
26.4.326.sub-ip-static.something.net
I was to get from that: (for all of the records)
me.com
httm.com
something.net
Thanks!
Based on the answer for How can I perform a reverse string search in Excel without using VBA?, I modified the formula to replace periods instead of spaces, and adding -1 on the second line.
=RIGHT(A1,LEN(A1)-FIND("|",SUBSTITUTE(A1,".","|",
LEN(A1)-LEN(SUBSTITUTE(A1,".","")) - 1)))
Just copy and paste for each row you need.

Resources