I have following input in text format:
|Number|Name|SUMinRUB|Reason
|-|Table|1000|This is Text
| | | |Splitted in
| | | |Seveal Lines
|2|Chairs|2000|This is another
| | | |Text splitted
| | | |In several lines
And when converting to Excel, Reason column is converted into several lines. I need, to make it like this:
Result in Excel
You must replace "||||" to "" (empty string) or " " (space) (Find&Select -> Replace) in whole file before using the TextToColumns function.
Related
I have an Excel file with 2 sheets :
The first one got a list of keywords in a column.
The second one got sentences on a column along with an id on another column.
Thus the 2 sheets look like this :
Sheet 1: Sheet 2:
A A B
| the | | 15587 | The cat is walking |
| cat | | 94683 | No one here |
| ... | | 47222 | The TV is on |
| 59378 | No cat allowed |
| ... | ... |
What I want to do is to put on the B column of sheet 1 the list of sentences ids where the keyword is found. So here I'll get on sheet 1 :
A B
| the | 15587;47222 |
| cat | 15587;59378 |
| ... | ... |
Do you know how I can achieve this using functions ? I tried VLOOKUP but it only returns the first occurrence and I don't know how to use FILTER with an operator to check if the sentence contain a string.
Thanks
You could try:
Formula in E1:
=TEXTJOIN(";",,FILTER(A$1:A$4,ISNUMBER(SEARCH(" "&D1&" "," "&B$1:B$4&" ")),""))
Consider a spreadsheet with a "source" spreadsheet and a "formatted" sheet
The formatted sheet references data from a source sheet.
The ideal way for this to work is to use array formula
# formatted-sheet (formulas)
| title | description |
------------------------
| = ArrayFormula(source!A2:AA) | |
| | |
| | |
# source (raw data)
| title | description |
------------------------
| SomeTitle | long description |
| OtherTitle | Other description |
| emptyDesc | |
In google spreadsheet, the resulting formatted sheet displays like this :
# formatted-sheet (rendering formulas)
| title | description |
------------------------
| SomeTitle | long description |
| OtherTitle | Other description |
| emptyDesc | |
However after exporting to Excel format, the empty values are displayed as "0"
# formatted-sheet (rendering formulas)
| title | description |
------------------------
| SomeTitle | long description |
| OtherTitle | Other description |
| emptyDesc | 0 |
| 0 | 0 | # for every additional line captures by the array formula, zeroes everywhere
The fix I found for this, is to use an IF to check for empty string values
# formatted-sheet (formulas)
| title | description |
------------------------
| = ArrayFormula(IF(source!A2:AA = ""; ""; source!A2:AA)) | |
| | |
However the IF() formula is broken for cells that are longer than 255 characters, Is there a different workaround possible ?
Foe example a way to rpevent the empty strings to appear as "0" after exporting to xlsx and opening with Microsoft Excel ? or to improve the formula ?
Here is the reference for a sample sheet.
Try using:
=ARRAYFORMULA(IF(NOT(ISBLANK(source!B2:B)),source!A2:AA,""))
it also hides the last "emptyDesc". If this is not your intention please let me know.
I found out this trick from this question that is quite concise to convert everything to a text like format.
=ArrayFormula(source!A2:AA & "")
However it will most likely kill the formatting of numbers and interoperability, I have not made extensive tests regarding this, as it is fine for me in the current state
some cells of my excel won't change the date format(they're left aligned in the column).
I've tried everything: copied to notepad and back, text to column, changed the format using the format option (obviously), used DATEVALUE: returns !VALUE#.
I've spent hours trying to change that format and am not rich enough to throw my laptop.
| AR |
|------------|
| 1995-12-02 |
| 25/04/1989 |
| 25/04/1994 |
| 15/05/1994 |
| 13/06/1980 |
| 1981-02-04 |
| 1995-01-06 |
if this helps... evaluation of error on using DATEVALUE shows that the cell contains a constant..
For your specific case, following workaround will do:
=IF(ISERR(SEARCH("-",D2)),DATE(RIGHT(D2,4),MID(D2,4,2),LEFT(D2,2)),DATE(LEFT(D2,4),MID(D2,6,2),LEFT(D2,2)))
I have a table in an Excel sheet that is made up of 4 columns. Columns 2-4 have formulas in them. The 4th column has temperatures in it, and once it hits a certain temperature range I would like columns 1-4 (preferably) to copy over into another sheet.
How can I do that? I have tried to do a vlookup, but I don’t think it works because of the formulas in columns 3 and 4.
Do you have an example of data?
All i can think off is an lookup inside an 'If' statement
Eg.
| Column1 | Formula | Formula | Temperature |
| Text | text | text | 20 |
| Text | text | text | 25 |
| Text | text | text | 30 |
so maybe a helper column to the right
| Column1 | Formula | Formula | Temperature |Helper column |
| Text | text | text | 20 | 0 |
| Text | text | text | 25 | 1 |
| Text | text | text | 30 | 1 |
with the formula
=if(Temperature>"value","1","0")
=if(Temperature>"24","1","0")
Then use an if in your new column on different sheet saying
=if(Helper column = 1, column1, "")
In your new table
Hopefully that makes a bit of sense although it is tricky without seeing example data.
if you are ok with VBA this could probably be way easier to do!
I have a table like so (the first column):
| Table | What I want to achieve |
|--------|------------------------|
| 088888 | convert to number |
| 88888 | convert to number |
| 588888 | convert to number |
| 688888 | convert to number |
| V44100 | ignore and return text |
| W44101 | ignore and return text |
| S54001 | ignore and return text |
| V44102 | ignore and return text |
| BOLUTY | ignore and return text |
| SHOLIA | ignore and return text |
|--------|------------------------|
The table is generated from a database so all numbers comes formatted as text.
I want a formula that will help convert all text-formatted-numbers to numbers like the first 4 numbers in the cell above. the formula should be smart enough not to try to convert text to numbers, i.e when it encounters a text it should return the actual text.
I tried to use =VALUE(A1), while it works for the first 4 numbers above, it returns #VALUE error when it encounters real texts (last 6 texts in column A of the table above.
I have another formula like this (IF(OR(LEFT(A1)='1',LEFT(A1)='2',VALUE(A1),A1) This works as desired but it will be too long as I want to test for prefix numbers 0 through 9 i.e IF(OR) 0,1,2,3,4,5,6,7,8,9 etc
Is there a shorter/simpler way of achieving this without using the above unusually long formula?
Thanks.
As I mentioned in the comments use the error checking to do a mass conversion but if you still insist on a formula then here it is.
=IFERROR(INT(A1),A1)
EDIT: If you have decimal values in Col A then use VALUE instead of INT