Is there a way to move columns down?
-
Im trying to write a very long table (325 lines) for something personal, only for me to realize i typed one of the columns wrong. Heres a recreation.
(In case you dont get it, the mistake is in column 3), due to the size of this table, it would take me possibly an entire day to fix this mistake, so i need to the column down a row. Is this possible?
-
You didn’t really provide the necessary information on how the html(?) page was coded.
So this will be a wild guess as to how to solve this.Replace the
R?C3
with a regex likeR\d+C3
with a unique filler word likeR XXXXXXXXXX C3
.
Then select an instance ofXXXXXXXXXX
and useEdit->Multi-selectAll->Match case only
.
You should now have selected all instances. Press thebackspace
key and delete theremaining spaces
. UseEditor->Column Editor
and use the default setting for thenumber to insert
.Ok
- done. -
@Ekopalypse I´m not sure if this is what you mean by the necessary information but the text editor i was using before downloading Notepad++ to try to fix this also had a mode to show you what your typing as raw text, and this is what it looks like
|Column 1|Column 2|Column 3| |:-|:-|:-| |Text for R1C1|Text for R1C2|Text for R2C3| |Text for R2C1|Text for R2C2|Text for R3C3| |Text for R3C1|Text for R3C2|Text for R4C3| |Text for R4C1|Text for R4C2|Text for R5C3| |Text for R5C1|Text for R5C2|Text for R6C3| |Text for R6C1|Text for R6C2|Text for R7C3| |Text for R7C1|Text for R7C2|Text for R8C3| |Text for R8C1|Text for R8C2|Text for R9C3| |Text for R9C1|Text for R9C2|Text for R10C3| |Text for R10C1|Text for R10C2|Text for R11C3|
Also as stated above, i downloaded Notepad++ after encountering the issue, so i´m basically completely new to this program.
-
@Dochbert said in Is there a way to move columns down?:
and this is what it looks like
/Column /Column 2/Column 3/ <-- / means |
Whilst you have shown a bit more info it still isn’t enough to have a good shot at providing a solution.
We have a FAQ post here which shows how to insert examples so the posting engine does not alter any of the example.So what it means is, you insert some of the text you are working on, say about 10 lines is generally sufficient, then select it in the post box, and click on the
</>
icon above the post box. This will encompass the example in code and stops it being altered when posted. Now if the text is confidential, by all means alter it but preferably keep the context correct so we can best provide you with a solution. This also has the added benefit of allowing us to copy your example (so not needing to type something) for testing.Some questions are, since you seem to be using the
|
character as a column delimiter, is this character found elsewhere in the text?
Are the columns left justified, so that all of each column starts in the same position across the line?Terry
-
@Dochbert
So the short video below shows a method you could use IF all your columns line up vertically.It uses the column mode function (Edit, Begin/End Select in Column Mode) to highlight an area in a column for cutting/copying and pasting purposes. So the steps are:
- Position mouse in the first line of the 3rd column. Select main menu Edit, then Begin/End Select in Column Mode. Go to the bottom line and position the mouse in the last position of the 3rd column. Again select main menu Edit, then Begin/End Select in Column Mode. The entire 3rd column should now be highlighted.
- Now press Ctrl-C (copy), then delete key.
- Position mouse key in the first position of the 3rd column on the 2nd line.
- Press Ctrl-V (paste).
- Tidy up the first line 3rd column and the last line 1st and 2nd columns.
As a suggestion try this with some other text, or even say 10 lines of your text, just so you get the idea, before attempting it on the entire 325 lines. This process is referenced in the online manual here.
If your text isn’t as you show currently (neatly in columns left and right aligned) then as I said you need to show us in the manner I refer to so we can better help.
Terry
-
@Terry-R I edited the example data for it to be accurate using what you told me, and my table´s columns sadly arent aligned, im going to paste the full table to show you what it looks like.
|Date|Percentage| |:-|:-| |February 9|0.30769230769231%| |February 10|0.30864197530864%| |February 11|0.30959752321981%| |February 12|0.31055900621118%| |February 13|0.31152647975078%| |February 14|0.3125%| |February 15|0.31347962382445%| |February 16|0.31446540880503%| |February 17|0.31545741324921%| |February 18|0.31645569620253%| |February 19|0.31746031746032%| |February 20|0.31847133757962%| |February 21|0.31948881789137%| |February 22|0.32051282051282%| |February 23|0.32154340836013%| |February 25|0.32258064516129%| |February 26|0.32362459546926%| |February 27|0.32467532467532%| |February 28|0.3257328990228%| |March 1|0.32679738562092%| |March 2|0.32786885245902%| |March 3|0.32894736842105%| |March 4|0.33003300330033%| |March 5|0.33112582781457%| |March 6|0.33222591362126%| |March 7|0.33333333333333%| |March 8|0.33444816053512%| |March 9|0.33557046979866%| |March 10|0.33670033670034%| |March 11|0.33783783783784%| |March 12|0.33898305084746%| |March 13|0.34013605442177%| |March 14|0.34129692832765%| |March 15|0.34246575342466%| |March 16|0.34364261168385%| |March 17|0.3448275862069%| |March 18|0.34602076124567%| |March 19|0.34722222222222%| |March 20|0.34843205574913%| |March 21|0.34965034965035%| |March 22|0.35087719298246%| |March 23|0.35211267605634%| |March 24|0.35335689045936%| |March 25|0.35460992907801%| |March 26|0.355871886121%| |March 27|0.35714285714286%| |March 28|0.3584229390681%| |March 29|0.35971223021583%| |March 30|0.36101083032491%| |March 31|0.36231884057971%| |April 1|0.36363636363636%| |April 2|0.36496350364964%| |April 3|0.36630036630037%| |April 4|0.36764705882353%| |April 5|0.3690036900369%| |April 6|0.37037037037037%| |April 7|0.37174721189591%| |April 8|0.37313432835821%| |April 9|0.37453183520599%| |April 10|0.37593984962406%| |April 11|0.37735849056604%| |April 12|0.37878787878788%| |April 13|0.38022813688213%| |April 14|0.38167938931298%| |April 15|0.38314176245211%| |April 16|0.38461538461538%| |April 17|0.38610038610039%| |April 18|0.38759689922481%| |April 19|0.38910505836576%| |April 20|0.390625%| |April 21|0.3921568627451%| |April 22|0.39370078740157%| |April 23|0.39525691699605%| |April 24|0.3968253968254%| |April 25|0.39840637450199%| |April 26|0.4%| |April 27|0.40160642570281%| |April 28|0.40322580645161%| |April 29|0.40485829959514%| |April 30|0.40650406504065%| |May 1|0.40816326530612%| |May 2|0.40983606557377%| |May 3|0.41152263374486%| |May 4|0.41322314049587%| |May 5|0.4149377593361%| |May 6|0.41666666666667%| |May 7|0.418410041841%| |May 8|0.42016806722689%| |May 8|0.42194092827004%| |May 9|0.42372881355932%| |May 10|0.42553191489362%| |May 11|0.42735042735043%| |May 12|0.42918454935622%| |May 13|0.43103448275862%| |May 14|0.43290043290043%| |May 15|0.43478260869565%| |May 16|0.43668122270742%| |May 17|0.43859649122807%| |May 18|0.44052863436123%| |May 19|0.44247787610619%| |May 20|0.44444444444444%| |May 21|0.44642857142857%| |May 22|0.44843049327354%| |May 23|0.45045045045045%| |May 24|0.45248868778281%| |May 25|0.45454545454545%| |May 26|0.45662100456621%| |May 27|0.45871559633028%| |May 28|0.46082949308756%| |May 29|0.46296296296296%| |May 30|0.46511627906977%| |May 31|0.46728971962617%| |June 1|0.46948356807512%| |June 2|0.47169811320755%| |June 3|0.4739336492891%| |June 4|0.47619047619048%| |June 5|0.47846889952153%| |June 6|0.48076923076923%| |June 7|0.48309178743961%| |June 8|0.48543689320388%| |June 9|0.48780487804878%| |June 10|0.49019607843137%| |June 11|0.49261083743842%| |June 12|0.4950495049505%| |June 13|0.49751243781095%| |June 14|0.5%| |June 15|0.50251256281407%| |June 16|0.50505050505051%| |June 17|0.50761421319797%| |June 18|0.51020408163265%| |June 19|0.51282051282051%| |June 20|0.51546391752577%| |June 21|0.51813471502591%| |June 22|0.52083333333333%| |June 23|0.52356020942408%| |June 24|0.52631578947368%| |June 25|0.52910052910053%| |June 26|0.53191489361702%| |June 27|0.53475935828877%| |June 28|0.53763440860215%| |June 29|0.54054054054054%| |June 30|0.54347826086957%| |July 1|0.54644808743169%| |July 2|0.54945054945055%| |July 3|0.5524861878453%| |July 4|0.55555555555556%| |July 5|0.55865921787709%| |July 6|0.56179775280899%| |July 7|0.56497175141243%| |July 8|0.56818181818182%| |July 9|0.57142857142857%| |July 10|0.57471264367816%| |July 11|0.57803468208092%| |July 12|0.58139534883721%| |July 13|0.58479532163743%| |July 14|0.58823529411765%| |July 15|0.59171597633136%| |July 16|0.5952380952381%| |July 17|0.59880239520958%| |July 18|0.60240963855422%| |July 19|0.60606060606061%| |July 20|0.60975609756098%| |July 21|0.61349693251534%| |July 22|0.61728395061728%| |July 23|0.62111801242236%| |July 24|0.625%| |July 25|0.62893081761006%| |July 26|0.63291139240506%| |July 27|0.63694267515924%| |July 28|0.64102564102564%| |July 29|0.64516129032258%| |July 30|0.64935064935065%| |July 31|0.65359477124183%| |August 1|0.65789473684211%| |August 2|0.66225165562914%| |August 3|0.66666666666667%| |August 4|0.67114093959732%| |August 5|0.67567567567568%| |August 6|0.68027210884354%| |August 7|0.68493150684932%| |August 8|0.68965517241379%| |August 9|0.69444444444444%| |August 10|0.6993006993007%| |August 11|0.70422535211268%| |August 12|0.70921985815603%| |August 13|0.71428571428571%| |August 14|0.71942446043165%| |August 15|0.72463768115942%| |August 16|0.72992700729927%| |August 17|0.73529411764706%| |August 18|0.74074074074074%| |August 19|0.74626865671642%| |August 20|0.75187969924812%| |August 21|0.75757575757576%| |August 22|0.76335877862595%| |August 23|0.76923076923077%| |August 24|0.77519379844961%| |August 25|0.78125%| |August 26|0.78740157480315%| |August 27|0.79365079365079%| |August 28|0.8%| |August 29|0.80645161290323%| |August 30|0.8130081300813%| |August 31|0.81967213114754%| |September 1|0.82644628099174%| |September 2|0.83333333333333%| |September 3|0.84033613445378%| |September 4|0.84745762711864%| |September 5|0.85470085470085%| |September 6|0.86206896551724%| |September 7|0.8695652173913%| |September 8|0.87719298245614%| |September 9|0.88495575221239%| |September 10|0.89285714285714%| |September 11|0.9009009009009%| |September 12|0.90909090909091%| |September 13|0.91743119266055%| |September 14|0.92592592592593%| |September 15|0.93457943925234%| |September 16|0.94339622641509%| |September 17|0.95238095238095%| |September 18|0.96153846153846%| |September 19|0.97087378640777%| |September 20|0.98039215686275%| |September 21|0.99009900990099%| |September 22|1%| |September 23|1.010101010101%| |September 24|1.0204081632653%| |September 25|1.0309278350515%| |September 26|1.0416666666667%| |September 27|1.0526315789474%| |September 28|1.063829787234%| |September 29|1.0752688172043%| |September 30|1.0869565217391%| |October 1|1.0989010989011%| |October 2|1.1111111111111%| |October 3|1.123595505618%| |October 4|1.1363636363636%| |October 5|1.1494252873563%| |October 6|1.1627906976744%| |October 7|1.1764705882353%| |October 8|1.1904761904762%| |October 9|1.2048192771084%| |October 10|1.219512195122%| |October 11|1.2345679012346%| |October 12|1.25%| |October 13|1.2658227848101%| |October 14|1.2820512820513%| |October 15|1.2987012987013%| |October 16|1.3157894736842%| |October 17|1.3333333333333%| |October 18|1.3513513513514%| |October 19|1.3698630136986%| |October 20|1.3888888888889%| |October 21|1.4084507042254%| |October 22|1.4285714285714%| |October 23|1.4492753623188%| |October 24|1.4705882352941%| |October 25|1.4925373134328%| |October 26|1.5151515151515%| |October 27|1.5384615384615%| |October 28|1.5625%| |October 29|1.5873015873016%| |October 30|1.6129032258065%| |October 31|1.6393442622951%| |November 1|1.6666666666667%| |November 2|1.6949152542373%| |November 3|1.7241379310345%| |November 4|1.7543859649123%| |November 5|| |November 6|| |November 7|| |November 8|| |November 9|| |November 10|| |November 11|| |November 12|| |November 13|| |November 14|| |November 15|| |November 16|| |November 17|| |November 18|| |November 19|| |November 20|| |November 21|| |November 22|| |November 23|| |November 24|| |November 25|| |November 26|| |November 27|| |November 28|| |November 29|| |November 30|| |December 1|| |December 2|| |December 3|| |December 4|| |December 5|| |December 6|| |December 7|| |December 8|| |December 9|| |December 10|| |December 11|| |December 12|| |December 13|| |December 14|| |December 15|| |December 16|| |December 17|| |December 18|| |December 19|| |December 20|| |December 21|| |December 22|| |December 23|| |December 24|| |December 25|| |December 26|| |December 27|| |December 28|| |December 29|| |December 30|| |December 31||
The problem is that the data on the second column is 1 row too high, and its not aligned due to the first column, although i would be able to even out the first column if its the only available solution.
-
@Dochbert said in Is there a way to move columns down?:
@Terry-R I edited the example data for it to be accurate using what you told me, and my table´s columns sadly arent aligned, im going to paste the full table to show you what it looks like.
|Date|Percentage| |:-|:-| |February 9|0.30769230769231%| |February 10|0.30864197530864%| |February 11|0.30959752321981%| |February 12|0.31055900621118%| |February 13|0.31152647975078%| |February 14|0.3125%| |February 15|0.31347962382445%| |February 16|0.31446540880503%| |February 17|0.31545741324921%| |February 18|0.31645569620253%| |February 19|0.31746031746032%| |February 20|0.31847133757962%| |February 21|0.31948881789137%| |February 22|0.32051282051282%| |February 23|0.32154340836013%| |February 25|0.32258064516129%| |February 26|0.32362459546926%| |February 27|0.32467532467532%| |February 28|0.3257328990228%| |March 1|0.32679738562092%| |March 2|0.32786885245902%| |March 3|0.32894736842105%| |March 4|0.33003300330033%| |March 5|0.33112582781457%| |March 6|0.33222591362126%| |March 7|0.33333333333333%| |March 8|0.33444816053512%| |March 9|0.33557046979866%| |March 10|0.33670033670034%| |March 11|0.33783783783784%| |March 12|0.33898305084746%| |March 13|0.34013605442177%| |March 14|0.34129692832765%| |March 15|0.34246575342466%| |March 16|0.34364261168385%| |March 17|0.3448275862069%| |March 18|0.34602076124567%| |March 19|0.34722222222222%| |March 20|0.34843205574913%| |March 21|0.34965034965035%| |March 22|0.35087719298246%| |March 23|0.35211267605634%| |March 24|0.35335689045936%| |March 25|0.35460992907801%| |March 26|0.355871886121%| |March 27|0.35714285714286%| |March 28|0.3584229390681%| |March 29|0.35971223021583%| |March 30|0.36101083032491%| |March 31|0.36231884057971%| |April 1|0.36363636363636%| |April 2|0.36496350364964%| |April 3|0.36630036630037%| |April 4|0.36764705882353%| |April 5|0.3690036900369%| |April 6|0.37037037037037%| |April 7|0.37174721189591%| |April 8|0.37313432835821%| |April 9|0.37453183520599%| |April 10|0.37593984962406%| |April 11|0.37735849056604%| |April 12|0.37878787878788%| |April 13|0.38022813688213%| |April 14|0.38167938931298%| |April 15|0.38314176245211%| |April 16|0.38461538461538%| |April 17|0.38610038610039%| |April 18|0.38759689922481%| |April 19|0.38910505836576%| |April 20|0.390625%| |April 21|0.3921568627451%| |April 22|0.39370078740157%| |April 23|0.39525691699605%| |April 24|0.3968253968254%| |April 25|0.39840637450199%| |April 26|0.4%| |April 27|0.40160642570281%| |April 28|0.40322580645161%| |April 29|0.40485829959514%| |April 30|0.40650406504065%| |May 1|0.40816326530612%| |May 2|0.40983606557377%| |May 3|0.41152263374486%| |May 4|0.41322314049587%| |May 5|0.4149377593361%| |May 6|0.41666666666667%| |May 7|0.418410041841%| |May 8|0.42016806722689%| |May 8|0.42194092827004%| |May 9|0.42372881355932%| |May 10|0.42553191489362%| |May 11|0.42735042735043%| |May 12|0.42918454935622%| |May 13|0.43103448275862%| |May 14|0.43290043290043%| |May 15|0.43478260869565%| |May 16|0.43668122270742%| |May 17|0.43859649122807%| |May 18|0.44052863436123%| |May 19|0.44247787610619%| |May 20|0.44444444444444%| |May 21|0.44642857142857%| |May 22|0.44843049327354%| |May 23|0.45045045045045%| |May 24|0.45248868778281%| |May 25|0.45454545454545%| |May 26|0.45662100456621%| |May 27|0.45871559633028%| |May 28|0.46082949308756%| |May 29|0.46296296296296%| |May 30|0.46511627906977%| |May 31|0.46728971962617%| |June 1|0.46948356807512%| |June 2|0.47169811320755%| |June 3|0.4739336492891%| |June 4|0.47619047619048%| |June 5|0.47846889952153%| |June 6|0.48076923076923%| |June 7|0.48309178743961%| |June 8|0.48543689320388%| |June 9|0.48780487804878%| |June 10|0.49019607843137%| |June 11|0.49261083743842%| |June 12|0.4950495049505%| |June 13|0.49751243781095%| |June 14|0.5%| |June 15|0.50251256281407%| |June 16|0.50505050505051%| |June 17|0.50761421319797%| |June 18|0.51020408163265%| |June 19|0.51282051282051%| |June 20|0.51546391752577%| |June 21|0.51813471502591%| |June 22|0.52083333333333%| |June 23|0.52356020942408%| |June 24|0.52631578947368%| |June 25|0.52910052910053%| |June 26|0.53191489361702%| |June 27|0.53475935828877%| |June 28|0.53763440860215%| |June 29|0.54054054054054%| |June 30|0.54347826086957%| |July 1|0.54644808743169%| |July 2|0.54945054945055%| |July 3|0.5524861878453%| |July 4|0.55555555555556%| |July 5|0.55865921787709%| |July 6|0.56179775280899%| |July 7|0.56497175141243%| |July 8|0.56818181818182%| |July 9|0.57142857142857%| |July 10|0.57471264367816%| |July 11|0.57803468208092%| |July 12|0.58139534883721%| |July 13|0.58479532163743%| |July 14|0.58823529411765%| |July 15|0.59171597633136%| |July 16|0.5952380952381%| |July 17|0.59880239520958%| |July 18|0.60240963855422%| |July 19|0.60606060606061%| |July 20|0.60975609756098%| |July 21|0.61349693251534%| |July 22|0.61728395061728%| |July 23|0.62111801242236%| |July 24|0.625%| |July 25|0.62893081761006%| |July 26|0.63291139240506%| |July 27|0.63694267515924%| |July 28|0.64102564102564%| |July 29|0.64516129032258%| |July 30|0.64935064935065%| |July 31|0.65359477124183%| |August 1|0.65789473684211%| |August 2|0.66225165562914%| |August 3|0.66666666666667%| |August 4|0.67114093959732%| |August 5|0.67567567567568%| |August 6|0.68027210884354%| |August 7|0.68493150684932%| |August 8|0.68965517241379%| |August 9|0.69444444444444%| |August 10|0.6993006993007%| |August 11|0.70422535211268%| |August 12|0.70921985815603%| |August 13|0.71428571428571%| |August 14|0.71942446043165%| |August 15|0.72463768115942%| |August 16|0.72992700729927%| |August 17|0.73529411764706%| |August 18|0.74074074074074%| |August 19|0.74626865671642%| |August 20|0.75187969924812%| |August 21|0.75757575757576%| |August 22|0.76335877862595%| |August 23|0.76923076923077%| |August 24|0.77519379844961%| |August 25|0.78125%| |August 26|0.78740157480315%| |August 27|0.79365079365079%| |August 28|0.8%| |August 29|0.80645161290323%| |August 30|0.8130081300813%| |August 31|0.81967213114754%| |September 1|0.82644628099174%| |September 2|0.83333333333333%| |September 3|0.84033613445378%| |September 4|0.84745762711864%| |September 5|0.85470085470085%| |September 6|0.86206896551724%| |September 7|0.8695652173913%| |September 8|0.87719298245614%| |September 9|0.88495575221239%| |September 10|0.89285714285714%| |September 11|0.9009009009009%| |September 12|0.90909090909091%| |September 13|0.91743119266055%| |September 14|0.92592592592593%| |September 15|0.93457943925234%| |September 16|0.94339622641509%| |September 17|0.95238095238095%| |September 18|0.96153846153846%| |September 19|0.97087378640777%| |September 20|0.98039215686275%| |September 21|0.99009900990099%| |September 22|1%| |September 23|1.010101010101%| |September 24|1.0204081632653%| |September 25|1.0309278350515%| |September 26|1.0416666666667%| |September 27|1.0526315789474%| |September 28|1.063829787234%| |September 29|1.0752688172043%| |September 30|1.0869565217391%| |October 1|1.0989010989011%| |October 2|1.1111111111111%| |October 3|1.123595505618%| |October 4|1.1363636363636%| |October 5|1.1494252873563%| |October 6|1.1627906976744%| |October 7|1.1764705882353%| |October 8|1.1904761904762%| |October 9|1.2048192771084%| |October 10|1.219512195122%| |October 11|1.2345679012346%| |October 12|1.25%| |October 13|1.2658227848101%| |October 14|1.2820512820513%| |October 15|1.2987012987013%| |October 16|1.3157894736842%| |October 17|1.3333333333333%| |October 18|1.3513513513514%| |October 19|1.3698630136986%| |October 20|1.3888888888889%| |October 21|1.4084507042254%| |October 22|1.4285714285714%| |October 23|1.4492753623188%| |October 24|1.4705882352941%| |October 25|1.4925373134328%| |October 26|1.5151515151515%| |October 27|1.5384615384615%| |October 28|1.5625%| |October 29|1.5873015873016%| |October 30|1.6129032258065%| |October 31|1.6393442622951%| |November 1|1.6666666666667%| |November 2|1.6949152542373%| |November 3|1.7241379310345%| |November 4|1.7543859649123%| |November 5|| |November 6|| |November 7|| |November 8|| |November 9|| |November 10|| |November 11|| |November 12|| |November 13|| |November 14|| |November 15|| |November 16|| |November 17|| |November 18|| |November 19|| |November 20|| |November 21|| |November 22|| |November 23|| |November 24|| |November 25|| |November 26|| |November 27|| |November 28|| |November 29|| |November 30|| |December 1|| |December 2|| |December 3|| |December 4|| |December 5|| |December 6|| |December 7|| |December 8|| |December 9|| |December 10|| |December 11|| |December 12|| |December 13|| |December 14|| |December 15|| |December 16|| |December 17|| |December 18|| |December 19|| |December 20|| |December 21|| |December 22|| |December 23|| |December 24|| |December 25|| |December 26|| |December 27|| |December 28|| |December 29|| |December 30|| |December 31||
The problem is that the data on the second column is 1 row too high, and its not aligned due to the first column, although i would be able to even out the first column if its the only available solution.
I’ll suggest one solution. It is not the only solution. It uses a plugin which I wrote, called Columns++. You can install it from within Notepad++: save any open files, select Plugins | Plugins Admin… from the main menu, scroll down until you see Columns++, check the box beside it, then click the Install button at the top right.
From the Columns++ menu on the Plugins menu, select Convert separated values to tabs…; then choose Column separator: Vertical line. You can leave the remaining settings as they are; click OK.
Now, on the Columns++ menu, click Elastic tabstops. You’ll see your columns line up.
Next, make a rectangular selection encompassing the data you want to move. Here’s how you do that. Click on the left side of the 0 that begins the first value (0.30769230769231%). Scroll down using the mouse (not the keyboard!) until you see the last line with a number in the same column. Hold down the Shift and Alt keys and click to the right of the tab that follows that value. Include the tab! (Depending on your settings, you might not be able to see the tab. Just click well to the right of the number.)
Now press Ctrl+X on your keyboard. That will cut the column and copy it to the clipboard.
Now find the line where the data should have started (February 10), click to the right of the tab that follows that (if your settings are such that you don’t see tabs, don’t worry, just click well to the right of the visible text on the line), and press Ctrl+V to paste the data in the correct position.
To restore the original format, select Columns | Convert tabs to separated values. Leave the settings unchanged and click OK. (There will probably be an extra | on the last line of the data you pasted — November 5th in your example. Delete that.)
-
@Coises It worked! Thank you so much for providing this solution and writing this plugin, it would’ve taken me HOURS to fix this mistake, i truly cannot thank you enough for this!
-
Based on your data posted in this comment, I think I have a regex-replace that will do the trick for you.
Open the find/replace form (“Search->Replace…” from the main menu or Ctrl+H with default keybindings, and do the following:
- Make sure Wrap around is checked
- Set Search Mode to
Regular expression
- Find what:
(\d+(?:\.\d+)?%)?(\|\R\|[^|]*\|)
- Replace with:
${2}${1}
- Hit
Replace All
Using this regex/replace, I was able to convert this
|Date|Percentage| |:-|:-| |February 9|0.30769230769231%| |February 10|0.30864197530864%| |February 11|19%| |February 14|0.3125%| |February 15|0.31347962382445%| |February 16|0.31446540880503%| |February 17|0.31545741324921%| |February 18|5%| |February 22|| |Blerun 33|15.7934343%| |rkejrkej 22|| |rjerkjekre 33333|78.334343%| |rekerkekre |99.4444%| |jgkjgkf|| |yiowpwk||
to the desired
|Date|Percentage| |:-|:-| |February 9|| |February 10|0.30769230769231%| |February 11|0.30864197530864%| |February 14|19%| |February 15|0.3125%| |February 16|0.31347962382445%| |February 17|0.31446540880503%| |February 18|0.31545741324921%| |February 22|5%| |Blerun 33|| |rkejrkej 22|15.7934343%| |rjerkjekre 33333|| |rekerkekre |78.334343%| |jgkjgkf|99.4444%| |yiowpwk||
This approach is very slow: it takes something like a minute to process a 122,833 line file. That said, the other approaches proposed above seem like they’re even slower. In addition, if you wanted this process to be faster, you could try using
re
the PythonScript plugin or just writing a simple Python script that works independently of Notepad++. You would have to tweak the find and replace regexes to work with Python’sre
, but that’s not too hard.Lastly, you can save find/replace operations in a macro, which saves you having to do all the steps listed above.
-
Hello, @dochbert, @ekopalypse, @terry-r, @Coises, @mark-olson and All,
Mark, from your INPUT text :
|Date|Percentage| |:-|:-| |February 9|0.30769230769231%| |February 10|0.30864197530864%| |February 11|19%| |February 14|0.3125%| |February 15|0.31347962382445%| |February 16|0.31446540880503%| |February 17|0.31545741324921%| |February 18|5%| |February 22|| |Blerun 33|15.7934343%| |rkejrkej 22|| |rjerkjekre 33333|78.334343%| |rekerkekre |99.4444%| |jgkjgkf|| |yiowpwk||
If we delete the two last lines
|jgkjgkf||
and|yiowpwk||
, then, after running your search-replacement, I got this text:|Date|Percentage| |:-|:-| |February 9|| |February 10|0.30769230769231%| |February 11|0.30864197530864%| |February 14|19%| |February 15|0.3125%| |February 16|0.31347962382445%| |February 17|0.31446540880503%| |February 18|0.31545741324921%| |February 22|5%| |Blerun 33|| |rkejrkej 22|15.7934343%| |rjerkjekre 33333|| |rekerkekre |78.334343%99.4444%|
Note that the last line is not exact and should be
|rekerkekre |78.334343%|
onlyThus, I tried to solve this problem and here is a generalization of your method !
Let’s suppose we have this text :
|Year|Month|Day|Percentage| |:-|:-|:-|:-| |2025|February|10|0.1%| |2025|February|11|0.2%| |2025|February|12|| |2025|February|13|0.4%| |2025|February|14|0.5%| |2025|February|15|| |2025|February|16|| |2025|February|17|0.6%| |2025|February|18|0.7%| |2025|February|19|0.8%|
And that we want to move all text of the column
4
downwardsNote that the last line
|2025|February|19|0.8%|
is followed with a line-break which ends the file contents !First, with this first regex S/R, we replace any
|
character, except for the first one and the last two containing the percentage value, by a!
charFIND
(?!^)\|(?=.+\|.*?\|$)
REPLACE
!
So our INPUT text is changed as :
|Year!Month!Day|Percentage| |:-!:-!:-|:-| |2025!February!10|0.1%| |2025!February!11|0.2%| |2025!February!12|| |2025!February!13|0.4%| |2025!February!14|0.5%| |2025!February!15|| |2025!February!16|| |2025!February!17|0.6%| |2025!February!18|0.7%| |2025!February!19|0.8%|
Now, we apply the main regex S/R :
FIND
(?-s)(\d+(?:\.\d+)?%)?(\|\R\|.*?\|)|(?:[^%\r\n]+%(?=\|\R\z))
REPLACE
${2}${1}
Running that S/R once, we get :
|Year!Month!Day|Percentage| |:-!:-!:-|:-| |2025!February!10|| |2025!February!11|0.1%| |2025!February!12|0.2%| |2025!February!13|| |2025!February!14|0.4%| |2025!February!15|0.5%| |2025!February!16|| |2025!February!17|| |2025!February!18|0.6%| |2025!February!19|0.7%|
Then, if desired, you may again re-run this regex S/R and it returns :
|Year!Month!Day|Percentage| |:-!:-!:-|:-| |2025!February!10|| |2025!February!11|| |2025!February!12|0.1%| |2025!February!13|0.2%| |2025!February!14|| |2025!February!15|0.4%| |2025!February!16|0.5%| |2025!February!17|| |2025!February!18|| |2025!February!19|0.6%|
And… after some clicks on the
Replace All
button, you should get :|Year!Month!Day|Percentage| |:-!:-!:-|:-| |2025!February!10|| |2025!February!11|| |2025!February!12|| |2025!February!13|| |2025!February!14|| |2025!February!15|| |2025!February!16|| |2025!February!17|| |2025!February!18|| |2025!February!19||
Finally, the trivial S/R
FIND
!
REPLACE
|
Would replace all the
!
chars by the separator characterBest Regards,
guy038