• 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

Searching for Data With a User Form|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / Searching for Data With a User Form|General Excel Questions & Answers|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 ForumGeneral Excel Questions & Answe…Searching for Data With a User Form
sp_PrintTopic sp_TopicIcon
Searching for Data With a User Form
Avatar
Christopher Pieczora

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
February 5, 2020
sp_UserOfflineSmall Offline
1
February 5, 2020 - 7:09 am
sp_Permalink sp_Print

Hi there,

Created the search box with the macros , as per the web site, doesn't seem to find any records?

Have attached a copy of the excel

 

Any help would be great.

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
2
February 5, 2020 - 11:05 am
sp_Permalink sp_Print

Hi Christopher

Try changing this line of code from

RecordRow = Application.Match(CLng(TextBox1.Value), Range("Table1[Record]"), 0)

to

RecordRow = Application.Match(TextBox1.Value, Range("Table1[Store]"), 0)

1) You are searching for text so no need to convert to CLng

2) You are searching the wrong field Record instead of Store

Hope this helps.

Sunny

Avatar
Christopher Pieczora

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
February 5, 2020
sp_UserOfflineSmall Offline
3
February 5, 2020 - 9:14 pm
sp_Permalink sp_Print

Hi Sunny,

 

Thank you for your help.  This works only when I am searching by Store, but does not work when I am searching by any other field even if I include the Store in the search, for example :  Store - NOF, product - Apples.  Do not receive the correct answer.

 

Again much appreciate the help

Christopher

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
4
February 6, 2020 - 9:02 am
sp_Permalink sp_Print

Hi Christopher

The form was designed to search by one field.

Data in that field must be unique  as the form will only search for the 1st occurrence.

In your sample data, the are multiple NOFs and this form will not work for you.

Cheers

Sunny

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1514
Member Since:
October 5, 2010
sp_UserOnlineSmall Online
5
February 6, 2020 - 2:18 pm
sp_Permalink sp_Print

Hi Christopher,

As Sunny said, the form in my blog post was designed to only search using one field and to return 1 record.

How do you wish the search to work?  Do you want to be able to specify multiple fields and then return all matching records?

If so do you want to then pick just 1 record to edit?

I notice that the spelling of certain things is not consistent in your data.  There are several different spellings of Kelloggs and Baguette.  These inconsistencies will mess up searches.

Have you considered just using the filters on the table to find what you want?

Regards

Phil

Avatar
Christopher Pieczora

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
February 5, 2020
sp_UserOfflineSmall Offline
6
February 6, 2020 - 9:29 pm
sp_Permalink sp_Print

Thank you Sunny and Phil,  as good as this search form is, I now understand that this is not going help me out.  I appreciate the help on this one. 

Take care

Christopher

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1807
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
7
February 6, 2020 - 10:02 pm
sp_Permalink sp_Print

Hi Christopher,

You can play around with one of the search forms I'm using, see the file attached.

Type 008 for example in the Search for box.

Avatar
Christopher Pieczora

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
February 5, 2020
sp_UserOfflineSmall Offline
8
February 7, 2020 - 2:12 am
sp_Permalink sp_Print

Hi Catalin,

Thank you very much, this seems to be the type of search form I am looking for.  I'll play around with it, again thanks

Christopher

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Philip Treacy, Jack Brett, Martyn Cheney, Rocco Pinneri, Benny Nielsen, LAFONSO HERNANDEZ
Guest(s) 10
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:
LAFONSO HERNANDEZ
Hayden Hao
Angela chen
Sean Moore
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Forum Stats:
Groups: 3
Forums: 24
Topics: 6211
Posts: 27239

 

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.