ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditionally inserting blank rows using macro (https://www.excelbanter.com/excel-programming/291904-conditionally-inserting-blank-rows-using-macro.html)

Steve Hill[_2_]

Conditionally inserting blank rows using macro
 
I have a workbook containing the results from an archery competition,
(the data in there is just to make sure that it is working fine, I
will delete it once it is fully functioning), and I need some help
with the code.

I have found one problem when i come to format the team results page
for
presentational reasons. As was pointed out to me, there can be
situations
when there is not enough members to constitute a full team, (in fact
we had this problem only Sunday.)

A macro for generating the team results was given to me, but when
there are less than four members in a team, it immediately moves onto
the next university. I would like to have a situation where extra rows
would be inserted to make up the numbers in a team, (if only two team
members for novice, enters thes results followed by either blank rows
or the full data but with no name and scores of zero), as I plan to
write/record a macro whereas it takes
the team results sheet and formats it by moving the data from the
table to elsewhere.

If I simply copy the data as it is now, I will come unstuck when a
team in future has more or less than the cell ranges I have defined to
move for this set of results. Since each team has 4 members, inserting
blank rows in means I can define each range for novice/experienced and
each university.

I was thinking of inserting a new row immediately after the results
that are there, achieved by counting the number in each team and an if
statement.

The workbook can be found at
http://www.geocities.com/nulice2002/BUTTS04.xls

Thanks in advance to anyone who replies.

Tom Ogilvy

Conditionally inserting blank rows using macro
 
Done and sent.

--
Regards,
Tom Ogilvy

"Steve Hill" wrote in message
om...
I have a workbook containing the results from an archery competition,
(the data in there is just to make sure that it is working fine, I
will delete it once it is fully functioning), and I need some help
with the code.

I have found one problem when i come to format the team results page
for
presentational reasons. As was pointed out to me, there can be
situations
when there is not enough members to constitute a full team, (in fact
we had this problem only Sunday.)

A macro for generating the team results was given to me, but when
there are less than four members in a team, it immediately moves onto
the next university. I would like to have a situation where extra rows
would be inserted to make up the numbers in a team, (if only two team
members for novice, enters thes results followed by either blank rows
or the full data but with no name and scores of zero), as I plan to
write/record a macro whereas it takes
the team results sheet and formats it by moving the data from the
table to elsewhere.

If I simply copy the data as it is now, I will come unstuck when a
team in future has more or less than the cell ranges I have defined to
move for this set of results. Since each team has 4 members, inserting
blank rows in means I can define each range for novice/experienced and
each university.

I was thinking of inserting a new row immediately after the results
that are there, achieved by counting the number in each team and an if
statement.

The workbook can be found at
http://www.geocities.com/nulice2002/BUTTS04.xls

Thanks in advance to anyone who replies.




Steve Hill[_2_]

Conditionally inserting blank rows using macro
 
You are an absolute star at this. If I ever meet you, remind me to buy
you several drinks.

Thanks

"Tom Ogilvy" wrote in message ...
Done and sent.

--
Regards,
Tom Ogilvy

"Steve Hill" wrote in message
om...
I have a workbook containing the results from an archery competition,
(the data in there is just to make sure that it is working fine, I
will delete it once it is fully functioning), and I need some help
with the code.

I have found one problem when i come to format the team results page
for
presentational reasons. As was pointed out to me, there can be
situations
when there is not enough members to constitute a full team, (in fact
we had this problem only Sunday.)

A macro for generating the team results was given to me, but when
there are less than four members in a team, it immediately moves onto
the next university. I would like to have a situation where extra rows
would be inserted to make up the numbers in a team, (if only two team
members for novice, enters thes results followed by either blank rows
or the full data but with no name and scores of zero), as I plan to
write/record a macro whereas it takes
the team results sheet and formats it by moving the data from the
table to elsewhere.

If I simply copy the data as it is now, I will come unstuck when a
team in future has more or less than the cell ranges I have defined to
move for this set of results. Since each team has 4 members, inserting
blank rows in means I can define each range for novice/experienced and
each university.

I was thinking of inserting a new row immediately after the results
that are there, achieved by counting the number in each team and an if
statement.

The workbook can be found at
http://www.geocities.com/nulice2002/BUTTS04.xls

Thanks in advance to anyone who replies.



All times are GMT +1. The time now is 03:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com