Calling a Macro within a cell

Discuss the spreadsheet application
Locked
User avatar
brookc84
Posts: 27
Joined: Sat Dec 07, 2013 3:52 pm

Calling a Macro within a cell

Post by brookc84 »

I'm attempting to automate a macro within an “IF” and “AND” statement, so as not having to “click” on the macro to execute it after each data entry. I've attached two spreadsheets to illustrate. The original spreadsheet works fine, and with the second one I'm attempting to create a conditional statement in Column J to call the macro... so there is no need to “click” on the macro button when I enter a number in Column I. When a number is entered in Column I, the macro deletes the value in Column D and moves all values 1 column to the left. A formula in Column B divides the sum of columns D-H by 5.

It appears OO can't find my macro (with the name of “update”) which is located in the basic library... under DocumentName-Standard-Module1. I've checked the spelling and it works fine when I “click” on the “Update Handicaps” macro button I created in the spreadsheet. Am I using incorrect syntax in Column J or is something else going on? The purpose of the second spreadsheet is to eliminate the need for the “Update Handicaps” macro button, and have the macro execute automatically every time a number is entered in Column I.

Let me explain what I'm trying to accomplish. This is a handicap program for a certain type of group golf competition. Column B averages the scores of the latest 5 rounds for any given player. Not everyone plays every time there is competitive match.

After a match is played, the date is entered in J1. Scores(points) are entered in Column I for each player that played that day. The macro button will delete the value in Column D and moves all values 1 column to the left and then deletes the value just entered in Column I... leaving it blank. The formula in Column J will update the date for the players that played that day.

Everything works as intended in the one spreadsheet. In the second spreadsheet, I'm simply trying to eliminated the need to “click” the macro button each time I enter a score in Column I. I'm attempting to incorporate (call) the macro from a conditional statement in Column J. Obviously, I'm doing something incorrectly... probably incorrect syntax... and I've tried different variations. Any help would be appreciated.

Thanks
Attachments
Test12102017GolfScores.ods
(21.02 KiB) Downloaded 95 times
12042017GolfScores.ods
(21 KiB) Downloaded 65 times
OpenOffice 4.1.3 on Win10
FJCC
Moderator
Posts: 9248
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Calling a Macro within a cell

Post by FJCC »

Please don't multi post. This is a duplicate of viewtopic.php?f=20&t=91537&sid=348a020c ... 6912fbb5a8
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Locked