Excel split data into columns - excel

I have a column that each cell contains data of the following form:
COLUMN 1
a.jpg
b.jpg
c.jpg | d.jpg
fd.jpg | dsf.jpg | ksk.jpg
cccc.gif
das.png
___dhi.jpg | bdi.png
and so on..
I want the column to split at the character |
so that the cell c.jpg | d.jpg --> becomes
COLUMN 1 ---> COLUMN 1 COLUMN 2
c.jpg | d.jpg ---> c.jpg d.jpg
Excel's text to columns cannot process this as i want it as the characetr | is not present for cell that do not have more than one filename.
How can I split the column 1 to to corresponding columns and of cource keep the cells that contain one filename as they are?

TLDR : Use notepad.
Long version.. copy the column 1 content to notepad. Then select all > copy > Paste Special (in excel) > set delimiter as "|" . Finish.
Hope it helps. (:

Related

Substracting part of cell

So lets say that in one row i have in 2 cells some data and I want to extract the data after the second "_" character:
| | A | B |
|---|:----------:|:---------------------:|
| 1 | 75875_QUWR | LALAHF_FHJ_75378_WZ44 | <- Input
| 2 | 75875_QUWR | 75378_WZ44 | <- Expected output
I tried using =RIGHT() function but than i will remove text from this first cell and so on, how can i write this function? Maybe I would compare this old cell and than to do if the second row is empty because maybe function deleted it to copy the one from first? No idea
Try:
=MID("_"&A1,FIND("#",SUBSTITUTE("_"&A1,"_","#",LEN("_"&A1)-LEN(SUBSTITUTE("_"&A1,"_",""))-1))+1,100)
Regardless of the times a "_" is present in your string, it will end up with the last two "words" in your string. Source
Use following formula.
=TRIM(MID(A1,SEARCH("#",SUBSTITUTE(A1,"_","#",2))+1,100))

Linux filtering a file by two columns and printing the output

I have a table that has 9 columns as shown below.
How would I first sort by the strand column so only those with a "+" are selected, and then of those I select the ones that have 3 exons (In the exon count column).
I have been trying to use grep for this as I understand I can pick out a word from a column, but I only get the particular column or just the total number.
using awk
awk -F "," ' $4=="+" && $9=="3" ' file.csv
If it's not CSV then remove -F "," from this command

excel filter data with many headers

I have a really long excel spreadsheet which I need to sort in a really unusual way:
I have many columns, one of which is full of numbers and blank spaces. The column is cut into many parts and is separated by blank spaces. The blank spaces act as the beginning and the end of two areas.
What I need to do is to leave only the numbers that are bigger than 999999999 and smaller than 2000000000 while keeping only the blank spaces adjacent to them. (and filtering all other columns the same way this one column is filtered)
--- Example Table:
Name | ID................. | other data
Bob.. |......................|~-~-~---~-``~
Taxes | 1000077008 | ~~ -`~ `~ ~--
Alice |......................| ~~--~-~ ~_~
Carel |......................|~~ ~ ~--_ ~~
Beans | 2000007804 | ~ ~_~ `~ ~~ `
Coffee| 1000078363 | ~ ~-`--`-` `_~-
--- Example Filtered Table:
Name | ID................. | other data
Bob.. |......................|~-~-~---~-``~
Taxes | 1000077008 | ~~ -`~ `~ ~--
Carel.|......................|~~ ~ ~--_ ~~
Coffee| 1000078363 | ~ ~-`--`-` `_~-
The spaces in front of the numbers show that the format is Text. Change the format in Excel to General or to Numeric and use a custom filter to achieve what you want.
This is an example of a custom filter:
If you cannot change the format, then use the =INT(TRIM(A1)) formula in Excel and sort them.

How do I reference cell dynamically in Microsoft Excel

I need to combine string values from (fixed column, variable row) + (fixed column, fixed row) how do I do this?
for example:
| ONE | TWO | THREE
ONE | ONE-ONE | TWO-ONE | THREE-ONE
TWO | ONE-TWO | TWO-TWO | THREE-TWO
THREE | ONE-THREE | TWO-THREE | THREE-THREE*
Any help would be appreciated, thank you!
Assuming top is row one and left is column A for your example, put the following in B2 drag across and down to fill the array.
=CONCATENATE(B$1,"-",$A2)

Vim - swap columns with visual mode

I have a markdown table like this.
I want to swap head3 column with head2.
| head1 | head3 | head2 |
|-------|-------|-------|
| foo | baa | none |
| some | text | here |
I can easily cut the column using visual mode (Ctrl-V), but how can I paste the column 'column-wisely'?
Also, which operating is easiert:
cut 'head 3' and paste behind 'head2'
cut 'head 2' and paste before 'head3'?
When you've selected and cut something with Ctrl+V, Vim will paste it as a column too. You can Ctrl+V select the column you want to swap into and paste, and the column you just replaced will now be in your paste register. Go back to the column you cut first and paste one more time to move the replaced column.
In steps:
Use Ctrl+V to select the entire head3 column
x to cut
Use Ctrl+V again to select the entire head2 column
p to paste
Move back to where head3 used to be
p to paste
Move to the first pip | : f+| then to the character right after it by l
Start selecting the column: Ctrl+v
Move to the end of the file: G
Move to the second pip, the one after the header3: 2f+|
Cut the selection: d
Move to the end of the line: $
And finally paste: p
Also, which operating is easiert:
cut 'head 3' and paste behind 'head2'
cut 'head 2' and paste before
'head3'?
For me, both work the same way.

Resources