I need vba code or function to automatically put data in next selection

Iron Contributor

I have playoffs file one my friend help me. I have press a button or switch to different worksheet to update data after I type in all score. How I make it automatically put data in?

 

 

Thanks You

7 Replies

@sf49ers19238597 

 

You've had a lot of views (over 60 as I write this) but no replies. I think it's because your request is quite confusing. Is it possible for you to post a copy of the spreadsheet itself? Without that, I doubt you're going to get any further response.

@mathetes 

 

I attached file. i have a button that update worksheet each round. i want function to update when iput score in

 

 

Thanks You

@sf49ers19238597 

a) I am unable to open the spreadsheet except in "Read0-Only" mode, but

b) even if I could open it with full functionality, it's not clear what "update" you want after entering data.

 

It's possible that someone else here in the techcommunity can take it further, but I suspect you're going to need to provide a bit more background info on what this spreadsheet is supposed to accomplish, what a macro or VBA routine is supposed to do. "Update" is ambiguous. To enter data, per se, is to update. What else do you want?

@sf49ers19238597 Interesting that your name is sf49ers but have chiefs winning ...

Sooo you can add a Worksheet_Change function and see if the score values changed and if so then run the macro but why have a macro at all?

I have recreated the macro action using in-cell formulas for the top half so it will update those later games automatically when you enter the scores.  I left the lower half and any further clean-up for you :)

see attached

I do not know that was made by a friend of mine

 

 

 

 

Thanks you

@mtarler 

 

 

I try worksheet change did not work for me

 

 

 

Thanks you

@sf49ers19238597 I don't understand what you mean by that.  Here is a screenshot where I changed Vikings to Giants and changed the Eagles score in the first game to 22 pts (and hence win):

mtarler_0-1612303442639.png

notice how the Eagles and Giants are now listed in the second games

Now I changed the Saints to the Lions and their score to 30 (and hence they win):

mtarler_1-1612303558439.png

notice how not only does the Lions appear in the second game now but they are against the Packers and the Eagles got bumped down to go against the 49ers because of their respective incoming rankings.  

Let me know what isn't working so I can understand and help.