• 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
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Multiple Criteria to pull multiple values in Excel Summary Table|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Multiple Criteria to pull multiple values in Excel Summary Table|VBA & Macros|Excel Forum|My Online Training Hub

vba course banner

Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
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 ForumVBA & MacrosMultiple Criteria to pull multiple …
sp_PrintTopic sp_TopicIcon
Multiple Criteria to pull multiple values in Excel Summary Table
Avatar
dale sain

New Member
Members
Level 0
Forum Posts: 1
Member Since:
March 12, 2019
sp_UserOfflineSmall Offline
1
March 12, 2019 - 1:21 pm
sp_Permalink sp_Print sp_EditHistory

Hi, I need some help to read numbers/text and output it to a summary table with multiple criterion using an excel formula. It is easily done using pivot tables but my audience is not tech savvy and need a formula to extract the values from Tab1.

Tab 1: Raw data with information
Tab 2: Example of dummy data. Basically, need to read text from column C, D, E in Raw Data

Tab 1 based on 2 criterion (Pillar and Group - columns A, B in Tab 1) and then spit out results in Tab 2 - Desired output. Note that in some cases there is more than one date/value to extract out based on the criterion.

Criteria should be based on Column A and B (Group and Pillar) ....
and when the criteria meets, it may or may not have more than 1 value (for example: Group 1, Pillar 1 might have 2 dates/values in column C for example. so I have to pull both dates in my summary table.

Any help would be greatly appreciated.

Thank you!

 

NOTE: Ideal would be an excel formula but if its not possible, VBA help will be appreciated with easy to understand comments.

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1824
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
2
March 18, 2019 - 11:30 pm
sp_Permalink sp_Print

Hi Dale,

If users cannot handle a simple pivot table, then I doubt that they will be able to handle complex array formulas.

As you mentioned, pivot tables are best for this, I suggest using a macro that will create the pivot when user clicks a button, it's much more easier than formulas.

The code Assumes that the data is organized in a defined table named "Table1", as in the file attached.

Sub CreatePivot()
Dim Wks As Worksheet, PvtName As String, pt As PivotTable, pivotFld As PivotField
Set Wks = ThisWorkbook.Worksheets.Add
PvtName = "PivotTable" & Format(Now(), "yyyymmddhhmmss")
ThisWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Table1").CreatePivotTable TableDestination:="'" & Wks.Name & "'!R1C1", _
TableName:=PvtName
Set pt = Wks.PivotTables(PvtName)

With pt.PivotFields("Group")
.Orientation = xlRowField
.Position = 1
End With
With pt.PivotFields("Pillar")
.Orientation = xlRowField
.Position = 2
End With
With pt.PivotFields("TARGETED Narrative and Content Finalized")
.Orientation = xlRowField
.Position = 3
End With
With pt.PivotFields("TARGETED Working Data Available in Final Format")
.Orientation = xlRowField
.Position = 4
End With
With pt.PivotFields("TARGETED Final Data Refreshed")
.Orientation = xlRowField
.Position = 5
End With
pt.RowAxisLayout xlTabularRow
With pt
.ColumnGrand = False
.RowGrand = False
End With
With pt
For Each pivotFld In .PivotFields
pivotFld.Subtotals(1) = False
Next
End With
Wks.Cells(1).CurrentRegion.EntireColumn.AutoFit

End Sub

Note that each time you press the button, a new pivot cache is created and a new pivot table is added based on the new cache. I assume that they will click only once, the next time they need to update it, they can simply right click that pivot and choose Refresh.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: John Kobiela, Lia Ro, Malcolm Sawyer
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 873
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 222
Jessica Stewart: 216
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Melanie Ford
Isaac Felbah
Adele Glover
Hitesh Asrani
Rohan Abraham
Anthony van Riessen
Erlinda Eloriaga
Abisola Ogundele
MARTYN STERRY
Rahim Lakhani
Forum Stats:
Groups: 3
Forums: 24
Topics: 6356
Posts: 27793

 

Member Stats:
Guest Posters: 49
Members: 32324
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.