Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Excel > Excel Programming

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 04-03-2019, 12:44 AM
Marcia Marcia is offline Windows 7 32bit Office 2013
Competent Performer
 
Join Date: May 2018
Location: Philippines
Posts: 182
Marcia is on a distinguished road
Default How to sort poll result ranked in ascending order

Hi. This midterm elections I would like to set up a poll quick count system. I need your help in providing a macro that when a button is activated, the rank, column c, is sorted from number 1 (highest number of votes) up to the last rank, per office. Sample sheet attached, thank you.


In the actual workbook, there are several data sheets and another sheet consolidating all the data sheets.
Attached Files
File Type: xlsx Count.xlsx (28.0 KB, 4 views)

Last edited by Marcia; 04-03-2019 at 07:18 AM. Reason: additional information
Reply With Quote
  #2  
Old 04-03-2019, 04:47 PM
p45cal p45cal is offline Windows 10 Office 2016
Expert
 
Join Date: Apr 2014
Posts: 253
p45cal has a spectacular aura aboutp45cal has a spectacular aura aboutp45cal has a spectacular aura about
Default

Rather than sort the original table (since this messes up your rank formulae) make a pivot table and refresh it when the data gets updated.
See pivot table at cell Q3 in the attached.
Note, that to keep the 2 districts of SANGGUNIANG PANLALAWIGAN separate I edited the cells A76:A89 and A91:A98 to reflect this.
Attached Files
File Type: xlsx msofficeforums42132Count.xlsx (37.0 KB, 1 views)
Reply With Quote
  #3  
Old 04-04-2019, 02:49 PM
Marcia Marcia is offline Windows 7 32bit Office 2013
Competent Performer
 
Join Date: May 2018
Location: Philippines
Posts: 182
Marcia is on a distinguished road
Default

Hi, p45cal. I guess I have to let pivot table do the work of sorting the data according to the rank or total number of votes. Thank you.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort numbers in Ascending order btserver Excel 5 03-16-2019 07:54 AM
Can't figure out sort order in OneNote kcirbostosf OneNote 1 05-18-2018 10:25 AM
Degree symbol not in expected sort order. slaycock Word 0 01-22-2018 09:05 AM
What is the Word sort order for text? Jennifer Murphy Word 2 01-27-2017 07:18 PM
VBA Sort Custom Order tandchas Excel Programming 1 04-15-2016 05:38 PM


All times are GMT -7. The time now is 10:09 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft