A
Anders
Hi,
I recently made an Excel spreadsheet for keeping track of my golf score.
The spreadsheet is quite simple. It consists of 4 sheets:
Scorecard, statistics, database and equations (for calculating some
specific).
I insert informations about the golf course I'm playing and how my score
was etc. I then hit a button "Save scorecard" that runs a macro. The
macro inserts specifik values from the scorecard into the database sheet
(which works like a charm). The macro also updates the "Statistics"
sheet with information about stroke number and points for par3, par4 and
par5 holes. This worked perfectly, until now!
If I click "Save scorecard" the database is updated, but the statistics
page is messed up.
The macro should just copy the scorecard matrix (M39:O48) and add the
values to the statistics matrix (AB3:AD12), and copy scorecard matrix
(P38:R48) and add the values to statistics matrix (AG3:AI13). However,
when hitting "Save scorecard" the matrices on the statistics sheet
suddenly contains information like this:
=0+(COUNTIF(AG1048553:AG1048574;5))
This should just read a number (0 in this case). Also many of the
entries are now listed as #### or #REF! Looking at the entry itself gets
you information like this:
=2+(COUNTIF(#REF!;4))
This entry from the example above should only read 2.
The macro that copies the matrices looks like this:
Sheets("Scorecard").Range("M39:O48").Copy
Sheets("Statistics").Range("AB3").PasteSpecial Operation:=xlAdd
Sheets("Scorecard").Range("P38:R48").Copy
Sheets("Statistics").Range("AG3").PasteSpecial Operation:=xlAdd
Any ideas on what's gone wrong here?
Anders
I recently made an Excel spreadsheet for keeping track of my golf score.
The spreadsheet is quite simple. It consists of 4 sheets:
Scorecard, statistics, database and equations (for calculating some
specific).
I insert informations about the golf course I'm playing and how my score
was etc. I then hit a button "Save scorecard" that runs a macro. The
macro inserts specifik values from the scorecard into the database sheet
(which works like a charm). The macro also updates the "Statistics"
sheet with information about stroke number and points for par3, par4 and
par5 holes. This worked perfectly, until now!
If I click "Save scorecard" the database is updated, but the statistics
page is messed up.
The macro should just copy the scorecard matrix (M39:O48) and add the
values to the statistics matrix (AB3:AD12), and copy scorecard matrix
(P38:R48) and add the values to statistics matrix (AG3:AI13). However,
when hitting "Save scorecard" the matrices on the statistics sheet
suddenly contains information like this:
=0+(COUNTIF(AG1048553:AG1048574;5))
This should just read a number (0 in this case). Also many of the
entries are now listed as #### or #REF! Looking at the entry itself gets
you information like this:
=2+(COUNTIF(#REF!;4))
This entry from the example above should only read 2.
The macro that copies the matrices looks like this:
Sheets("Scorecard").Range("M39:O48").Copy
Sheets("Statistics").Range("AB3").PasteSpecial Operation:=xlAdd
Sheets("Scorecard").Range("P38:R48").Copy
Sheets("Statistics").Range("AG3").PasteSpecial Operation:=xlAdd
Any ideas on what's gone wrong here?
Anders