• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Problem Code|Dashboards & Charts|Excel Forum|My Online Training Hub

You are here: Home / Problem Code|Dashboards & Charts|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumDashboards & ChartsProblem Code
sp_PrintTopic sp_TopicIcon
Problem Code
Avatar
Peter Worrallo

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
December 30, 2020
sp_UserOfflineSmall Offline
1
December 30, 2020 - 3:55 am
sp_Permalink sp_Print

Hi All,

Not sure if anyone can help with the attached file, basically I've got stuck with a complicated code I'm writing and also need some help with colour counting conditionally formatted cells, not sure if the latter is even possible!

The file is attached with a tab where I have explained the problem in more detail.

Best of luck with this one and Happy New Year!

 

Peter

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4447
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
December 30, 2020 - 8:55 am
sp_Permalink sp_Print

Hi Peter,

To answer your first question "I think the code in column T is working but cannot get it to obey rule B; If the player scores about 36 but does not win, the above rules do not apply and their handicap remains untouched", you can modify your formula like so:

=IF((AND(ISNUMBER(R3),R3<31,P3<Q3,R3=$R$34)),1,IF(R3=$R$35,1,IF(R3=37,-1,IF(R3=38,-2,IF(R3=39,-2,IF(R3>39,-3,""))))))

 

In regards to counting the number of times a player comes last or first, your data layout isn't conducive to this formula because it's not in a tabular layout. You can use COUNTIF, but you'd have to manually update the formula each time you add another week to add another COUNTIF for that week's results e.g.:

=COUNTIF(R3:R32,$R$35)+COUNTIF(Z3:Z32,$Z$35)+COUNTIF(AH3:AH32,$AH$35)

 

In regards to the conditional formatting, again this is a side effect of the data layout. There's no simpler way than to create two rules for each week, sorry.

Hope that helps.

Mynda

Avatar
Peter Worrallo

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
December 30, 2020
sp_UserOfflineSmall Offline
3
December 31, 2020 - 9:41 pm
sp_Permalink sp_Print

Hi Mynda,

Thanks for the quick response, very helpful, did get the win/losses count working, it is a manual exercise but I will build out a full year view of the spreadsheet and that will resolve the need for a manual addition (eventually!).

 

Still no luck with my rule B. I've highlighted a couple of examples (yellow) and added a comment. It may well be that I am asking too much of the code in a single instruction, if there is a work around for this, even using hidden columns, that will do.

Much appreciated,

 

Peter

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4447
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
January 7, 2021 - 2:05 pm
sp_Permalink sp_Print

Hi Peter,

In row 6 of your notes it says if a player scores 37 they have a point deducted, and you have factored this into your formula:

=IF((AND(ISNUMBER(R3),R3<31,P3<Q3,R3=$R$34)),1,IF(R3=$R$35,1,IF(R3=37,-1,IF(R3=38,-2,IF(R3=39,-2,IF(R3>39,-3,""))))))

Similarly, if they score 38 they have two points deducted:

=IF((AND(ISNUMBER(R3),R3<31,P3<Q3,R3=$R$34)),1,IF(R3=$R$35,1,IF(R3=37,-1,IF(R3=38,-2,IF(R3=39,-2,IF(R3>39,-3,""))))))

If you want a second criteria for winning, you need this formula:

=IF((AND(ISNUMBER(R3),R3<31,P3<Q3,R3=$R$34)),1,IF(R3=$R$35,1,IF(AND(R3=$R$34,R3=37),-1, 
IF(AND(R3=$R$34,R3=38),-2,IF(R3=39,-2,IF(R3>39,-3,""))))))
Mynda
Avatar
Peter Worrallo

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
December 30, 2020
sp_UserOfflineSmall Offline
5
February 2, 2021 - 8:56 am
sp_Permalink sp_Print

Hi Mynda,

Apologies for the long delay, I've been battling COVID for most of January, horrendous!

Thanks again for your very quick responses, this does seem rather trivial, Im sure I'll have some serious work code problem for you one day.

I'll play around with this and see if it works, 

Thanks again,

Peter

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4447
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
6
February 2, 2021 - 12:27 pm
sp_Permalink sp_Print

Hope you're feeling 100% soon, Peter!

Avatar
Peter Worrallo

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
December 30, 2020
sp_UserOfflineSmall Offline
7
February 9, 2021 - 8:11 pm
sp_Permalink sp_Print

Hi Mynda,

=IF((AND(ISNUMBER(Q3),Q3<30,O3<P3)),1,IF(Q3=Q$36,1,IF(Q3<Q$35,0,IF(Q3=Q$36,1,IF(Q3=37,-1,IF(Q3=38,-2,IF(Q3=39,-2,IF(Q3>39,-3,IF(Q3=Q$35,-1,"")))))))))

Code is working fine now, all conditions are being met.

Very much appreciate your expert help!

Thanks,

Peter

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4447
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
8
February 10, 2021 - 10:03 am
sp_Permalink sp_Print

Glad you figured it out, Peter!

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Velouria, Lionel Baijot, Ben Hughes
Guest(s) 12
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Hayden Hao
Angela chen
Sean Moore
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Forum Stats:
Groups: 3
Forums: 24
Topics: 6211
Posts: 27238

 

Member Stats:
Guest Posters: 49
Members: 31891
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.