A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Spreadsheet macro stopped working!



 
 
Thread Tools Display Modes
  #1  
Old November 20th, 2009, 05:18 PM posted to microsoft.public.excel.misc
Anders[_3_]
external usenet poster
 
Posts: 8
Default Spreadsheet macro stopped working!

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
  #2  
Old November 20th, 2009, 05:19 PM posted to microsoft.public.excel.misc
Anders[_3_]
external usenet poster
 
Posts: 8
Default Spreadsheet macro stopped working!

Sorry, forgot to say that it's Office 2007

Anders
  #3  
Old November 21st, 2009, 08:45 AM posted to microsoft.public.excel.misc
Anders[_3_]
external usenet poster
 
Posts: 8
Default Spreadsheet macro stopped working!

No one with an idea?
  #4  
Old November 21st, 2009, 04:46 PM posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
 
Posts: 20,252
Default Spreadsheet macro stopped working!

When replying to your own post it would be best to include the original text
in your reply.

Or cite the message ID of your original post.


Gord Dibben MS Excel MVP

On Sat, 21 Nov 2009 09:45:35 +0100, Anders wrote:

No one with an idea?


  #5  
Old November 22nd, 2009, 07:54 AM posted to microsoft.public.excel.misc
Anders[_3_]
external usenet poster
 
Posts: 8
Default Spreadsheet macro stopped working!

Trying again. Anyone with an idea???

Anders skrev:
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

  #6  
Old November 22nd, 2009, 05:28 PM posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
 
Posts: 20,252
Default Spreadsheet macro stopped working!

You can send the workbook to my email address and I'll take a look.

gorddibbATshawDOTca change the obvious.


Gord Dibben MS Excel MVP

On Sun, 22 Nov 2009 08:54:17 +0100, Anders wrote:

Trying again. Anyone with an idea???

Anders skrev:
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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.