Trouble creating a formula or a script, for moving rows of info from universe to sheet2 when conditions are met in a certain column.

rogcar

New Member
Joined
Aug 30, 2014
Messages
19
Ok here is what I want to do, if anyone can help:

On sheet 1 I have a player universe.
On sheet 2 I have 2 tables setup
1 for position players
1 for pitchers.

I am wanting to take the info from rows 5 and 8 to the position players table, thru Column I.
Also would like the rows of info from sheet 1 to be placed on starting row 4, then the next players info placed on row 5.
(And the condition would be if that position player is owned by a certain owner in column J, the examples i have used for this test is rog in column J as a owner for these 2 position players.)

I am wanting to take the info from rows 7 and 11 to the Pitchers table, thru Column I.
Also would like the rows of info from sheet 1 to be placed on starting row 4, then the next players info placed on row 5.
(And the condition would be if that pitcher player is owned by a certain owner in column J, the examples i have used for this test is rog in column J as a owner for these 2 pitcher players.)

I know this can be done, but i have tried different formulas, with no prevail, I am new to Excel and formulas and also VBA, i do have a VBA script i am using on the Universe page for a external site, also i think maybe this action would be better served with a VBA Script, but i will leave that to the experts.

I have tried a formula for this action, but its not working either, here it is:
=IFERROR(INDEX(Last,SMALL(IF((Owner="rog")*(Roster="MLB")*(RIGHT(Pos,1)<>"P"),ROW(First)-MIN(ROW(First))+1),ROW(1:1))),"")
When i run this formula i get nothing from it, i have also used the CSA to get the brackets around the formula.
I guess i can't leave a attachment, so any help would be greatly appreciated.
I hope i explained the problem good enough.
Thanks for any help.
Rog
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Ok here is a table like the spreadsheet just a sample size though:
Universe sheet
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 950"]
<colgroup><col><col><col><col span="2"><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Last
Name[/TD]
[TD]First
Name[/TD]
[TD]DOB[/TD]
[TD]Age[/TD]
[TD]Pos[/TD]
[TD]Team[/TD]
[TD]Length[/TD]
[TD]Salary[/TD]
[TD]Player
Value[/TD]
[TD]Owner[/TD]
[TD]Roster[/TD]
[/TR]
[T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]
[TD]35[/TD]
[TD]RP[/TD]
[TD]SF[/TD]
[TD]0[/TD]
[TD]0.00[/TD]
[TD]$0.65[/TD]
[TD]UFA[/TD]
[TD]AAA[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]sheet 2 = Position Players Table(Position Players only in this table)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 250"]
<tbody>[TR]
[TD][TABLE="width: 552"]
<tbody>[TR]
[TD="class: xl65, width: 70"]Last
Name[/TD]
[TD="class: xl65, width: 69"]First
Name[/TD]
[TD="class: xl66, width: 64"]Age[/TD]
[TD="class: xl66, width: 64"]Pos[/TD]
[TD="class: xl66, width: 68"]Team[/TD]
[TD="class: xl66, width: 75"]Length[/TD]
[TD="class: xl67, width: 73"]Salary[/TD]
[TD="class: xl68, width: 69"]Player
Value[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 950"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Sheet 2 = Pitchers Table(Pitchers only in the table)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 250"]
<tbody>[TR]
[TD][TABLE="width: 512"]
<tbody>[TR]
[TD="class: xl65, width: 64"]Last
Name[/TD]
[TD="class: xl66, width: 64"]First
Name[/TD]
[TD="class: xl67, width: 64"]Age[/TD]
[TD="class: xl67, width: 64"]Pos[/TD]
[TD="class: xl67, width: 64"]Team[/TD]
[TD="class: xl67, width: 64"]Length[/TD]
[TD="class: xl68, width: 64"]Salary[/TD]
[TD="class: xl69, width: 64"]Player
Value[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]If a row of info has got the name in column Owner, then it needs to be transfered to sheet 2 and the table it should go in depends on if the player is a pitcher or a position player, like in the example in universe table the name (rog) is in owner column in rows 5, 7, 8, 11.
So i need the position players rows (5 AND 8) in sheet 2 in Position Players table, at the starting row in that table ROW(A4).[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Same way with the other 2 rows in universe sheet (7 and 11) go to the Pitchers Table.

Note: only columns DOB AND ROSTER don't need to be added in sheet 2.

Hopefully this helps if i put these tables correctly.
Thanks Rog[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Ok i am getting nowhere i have looked thru several threads and posts.

All i want to do is get this info in sheet1 A2:I2 into Sheet2 Position Players Table A2:I2 = if "column J" has the name "rog" in it.
Here is the info:
[TABLE="width: 500"]
<tbody>[TR]
[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]
[TD]1[/TD]
[TD]Last name[/TD]
[TD]First name[/TD]
[TD]DOB[/TD]
[TD]AGE[/TD]
[TD]POS.[/TD]
[TD]TEAM[/TD]
[TD]YRS[/TD]
[TD]SALARY[/TD]
[TD]Player Value[/TD]
[TD]Owner[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Abreu[/TD]
[TD]Jose[/TD]
[TD]2/2/2[/TD]
[TD]25[/TD]
[TD]RF[/TD]
[TD]CWS[/TD]
[TD]2[/TD]
[TD]$2.00[/TD]
[TD]$2.50[/TD]
[TD]Rog[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

I have tried this
Code
=IFERROR(INDEX(Last,SMALL(IF((Owner="rog")*(Roster="MLB")*(RIGHT(Pos,1)<>"P"),ROW(First)-MIN(ROW(First))+1),ROW(1:1))),"")

By the way when i run this formula, i get nothing no errors.

Any Help would be Great and appreciated.
Thanks Rog
 
Last edited:
Upvote 0
Can i get someone to point me in the right direction?
The formula i posted in the above thread should work i think, but i am getting nothing, but i am not that experienced at all in excel or vba , so that is why i am asking.
Thanks
 
Upvote 0

Forum statistics

Threads
1,222,096
Messages
6,163,912
Members
451,865
Latest member
dunworthc

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