Copying to another sheet and missing out lines

rireland

Board Regular
Joined
Feb 12, 2004
Messages
64
My main sheet has the results of a competition in rows 1-100. 75% of the results won't count for the jumpoff ( its a horsey competition) and I want to automatically copy the successful details to another sheet. I've worked out how to to omit the unsuccessful results by using an IF statement ( IF cellx is > x then copy ) but I still end up with 100 rows - with 25 results and 75 blank rows. How can I copy but compact it down to 25 rows.

As a second question I need to sort the results. I know how to do a manual sort & I even worked out a macro so one keystroke can do the sort. It woruld be better if the sort would be automatic whenever there is a change in the scores.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Post the sort code and your copying code and we can combine the two to give you 25 sorted rows in one macro.
 
Upvote 0
I've put the "input" and the "output" on one sheet to make it simpler to read. I want the "output" - the bottom bit - to be in place order and without the blank lines. Ideally to automatically change as results come in.
score test 1.xls
BCDEFGHIJK
1GRADE3JUNIORtosuppressplacingsinsert"X"inyellowboxDRESS.SHOWJUMPING
2NoHORSERIDERPENALTYTEAM/CLUBFINALPLACESCOREJUMPTIMETOTALFAULT
330KarshnaCrystalPrincessOliviaWhatleyDDPC455.200.00.0
431AlexanderBeetleTaylorClarkWTPC 58.800.00.0
532FernAyreSaintNicHayleyAtkinsBDPC149.200.00.0
633OllieTaylorClarkWTPC 43.8rR
734ChevarnaKathrynFairbairnWTPC349.200.00.0
835FifeAshtonBrownGTPC 63.6RR
936B.P.ChristmasMintDeanneEarleyBDPC 33.60.0
1037RabbitPaigeLudbeyGTPC  0.0
1138PineRowSandStormMorganGrubbLPRC249.240.04.0
12
1330KarshnaCrystalPrincessOliviaWhatley0DDPC455.2000
14          
1532FernAyreSaintNicHayleyAtkins0BDPC149.2000
16          
1734ChevarnaKathrynFairbairn0WTPC349.2000
18          
19          
20          
2138PineRowSandStormMorganGrubb0LPRC249.2404
GRADE3 JUNIOR
 
Upvote 0
=IF($G3="","",B3) is in cell B3 and all the way across to O3. Then down to B11. If G3 is blank it means they don't figure in the jump off. So all the records that are not blank in
G3 are copied. Then I do a manual sort using Data, sort , column G. Hope this helps.
R
 
Upvote 0
Oh!

I see what you're doing now. Boy I feel dim.

Try this in your output sheet:
=INDEX(InputSheetName!$A:$K,MATCH(ROW(),InputSheetName!$H:$H,0),COLUMN())

Change InputSheetName! for whatever your input sheet name actually is.

Put the formula in A1:K5 (or however many places you have -- one row for each)
 
Upvote 0
Hi Again

I've named the input sheet INPUT and put in the formula

=INDEX(INPUT!$A:$K,MATCH(ROW(),INPUT!$H:$H,0),COLUMN())


in cells A1:K14 of OUTPUT and I get #N/A in all the cells. Can you check if I've made an error.

Richard
 
Upvote 0
I don't know why it isn't working for you. Here's an example using my method:
Excel Workbook
ABCDEFG
1InputOutput
2NameScoreRankNameScoreRank
3Andy Alfa0Freddy Foxtrot71
4Bernie Bravo1Danny Delta62
5Chris Charlie44Ernie Echo53
6Danny Delta62Chris Charlie44
7Ernie Echo53#N/A#N/A#N/A
8Freddy Foxtrot71#N/A#N/A#N/A
9Greg Golf3#N/A#N/A#N/A
Sheet1


It seems to work fine for me. I don't know what's wrong with yours. Perhaps change $H:$H with $H$1:$H$50 or whatever range, and $A:$K with $A$1:$K$50 or whatever?
 
Upvote 0
Have you considered using auto filter? Data / Filter / Auto Filter.

Place your data in a table, apply an auto filter, then either choose "Top 10..." or "Sort Ascending" in your Final Place column. You can adjust top 10 to top 4 or whatever else you may want.

Sheet1

<TABLE style="PADDING-RIGHT: 2pt; PADDING-LEFT: 2pt; FONT-SIZE: 10pt; FONT-FAMILY: Arial,Arial; BACKGROUND-COLOR: #ffffff" cellSpacing=0 cellPadding=0 border=1><COLGROUP><COL style="FONT-WEIGHT: bold; WIDTH: 30px"><COL style="WIDTH: 103px"><COL style="WIDTH: 221px"><COL style="WIDTH: 123px"><COL style="WIDTH: 89px"><COL style="WIDTH: 118px"><COL style="WIDTH: 108px"><COL style="WIDTH: 112px"><COL style="WIDTH: 70px"><COL style="WIDTH: 66px"><COL style="WIDTH: 106px"></COLGROUP><TBODY><TR style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center"><TD> </TD><TD>A</TD><TD>B</TD><TD>C</TD><TD>D</TD><TD>E</TD><TD>F</TD><TD>G</TD><TD>H</TD><TD>I</TD><TD>J</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">1</TD><TD style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; TEXT-ALIGN: center">No</TD><TD style="FONT-WEIGHT: bold; FONT-SIZE: 9pt">HORSE</TD><TD style="FONT-WEIGHT: bold; FONT-SIZE: 9pt">RIDER</TD><TD style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; TEXT-ALIGN: center">PENALTY</TD><TD style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; TEXT-ALIGN: center">TEAM/CLUB</TD><TD style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; TEXT-ALIGN: center">FINAL PLACE</TD><TD style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; TEXT-ALIGN: center">SCORE</TD><TD style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; TEXT-ALIGN: center">JUMP</TD><TD style="FONT-WEIGHT: bold; FONT-SIZE: 9pt; TEXT-ALIGN: center">TIME </TD><TD style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; TEXT-ALIGN: center">TOTAL FAULT</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">2</TD><TD style="TEXT-ALIGN: center">32</TD><TD>Fern Ayre Saint Nic</TD><TD>Hayley Atkins</TD><TD> </TD><TD style="TEXT-ALIGN: center">BDPC</TD><TD style="TEXT-ALIGN: center">1</TD><TD style="TEXT-ALIGN: center">49.2</TD><TD style="TEXT-ALIGN: center">0</TD><TD style="TEXT-ALIGN: center">0</TD><TD style="TEXT-ALIGN: center">0</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">3</TD><TD style="TEXT-ALIGN: center">38</TD><TD>Pine Row Sand Storm</TD><TD>Morgan Grubb</TD><TD> </TD><TD style="TEXT-ALIGN: center">LPRC</TD><TD style="TEXT-ALIGN: center">2</TD><TD style="TEXT-ALIGN: center">49.2</TD><TD style="TEXT-ALIGN: center">4</TD><TD style="TEXT-ALIGN: center">0</TD><TD style="TEXT-ALIGN: center">4</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">4</TD><TD style="TEXT-ALIGN: center">34</TD><TD>Chevarna</TD><TD>Kathryn Fairbairn</TD><TD> </TD><TD style="TEXT-ALIGN: center">WTPC</TD><TD style="TEXT-ALIGN: center">3</TD><TD style="TEXT-ALIGN: center">49.2</TD><TD style="TEXT-ALIGN: center">0</TD><TD style="TEXT-ALIGN: center">0</TD><TD style="TEXT-ALIGN: center">0</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">5</TD><TD style="TEXT-ALIGN: center">30</TD><TD style="FONT-SIZE: 8pt">Karshna Crystal Princess</TD><TD>Olivia Whatley</TD><TD> </TD><TD style="TEXT-ALIGN: center">DDPC</TD><TD style="TEXT-ALIGN: center">4</TD><TD style="TEXT-ALIGN: center">55.2</TD><TD style="TEXT-ALIGN: center">0</TD><TD style="TEXT-ALIGN: center">0</TD><TD style="TEXT-ALIGN: center">0</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">6</TD><TD style="TEXT-ALIGN: center">31</TD><TD>Alexander Beetle</TD><TD>Taylor Clark</TD><TD> </TD><TD style="TEXT-ALIGN: center">WTPC</TD><TD style="COLOR: #0000ff"> </TD><TD style="TEXT-ALIGN: center">58.8</TD><TD style="TEXT-ALIGN: center">0</TD><TD style="TEXT-ALIGN: center">0</TD><TD style="TEXT-ALIGN: center">0</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">7</TD><TD style="TEXT-ALIGN: center">33</TD><TD>Ollie</TD><TD>Taylor Clark</TD><TD> </TD><TD style="TEXT-ALIGN: center">WTPC</TD><TD style="COLOR: #0000ff"> </TD><TD style="TEXT-ALIGN: center">43.8</TD><TD style="TEXT-ALIGN: center">r</TD><TD> </TD><TD style="TEXT-ALIGN: center">R</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">8</TD><TD style="TEXT-ALIGN: center">35</TD><TD>Fife</TD><TD>Ashton Brown</TD><TD> </TD><TD style="TEXT-ALIGN: center">GTPC</TD><TD style="COLOR: #0000ff"> </TD><TD style="TEXT-ALIGN: center">63.6</TD><TD style="TEXT-ALIGN: center">R</TD><TD> </TD><TD style="TEXT-ALIGN: center">R</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">9</TD><TD style="TEXT-ALIGN: center">36</TD><TD>B.P. Christmas Mint</TD><TD>Deanne Earley</TD><TD> </TD><TD style="TEXT-ALIGN: center">BDPC</TD><TD style="COLOR: #0000ff"> </TD><TD style="TEXT-ALIGN: center">33.6</TD><TD> </TD><TD> </TD><TD style="TEXT-ALIGN: center">0</TD></TR><TR style="HEIGHT: 17px"><TD style="FONT-SIZE: 8pt; BACKGROUND-COLOR: #cacaca; TEXT-ALIGN: center">10</TD><TD style="TEXT-ALIGN: center">37</TD><TD>Rabbit</TD><TD>Paige Ludbey</TD><TD> </TD><TD style="TEXT-ALIGN: center">GTPC</TD><TD style="COLOR: #0000ff"> </TD><TD style="COLOR: #0000ff"> </TD><TD> </TD><TD> </TD><TD style="TEXT-ALIGN: center">0</TD></TR></TBODY></TABLE>

Excel tables to the web >> http://www.excel-jeanie-html.de/index.php?f=1" target="_blank"> Excel Jeanie HTML 4
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top