• 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

Search Formula -- Questions|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / Search Formula -- Questions|General Excel Questions & Answers|Excel Forum|My Online Training Hub
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 ForumGeneral Excel Questions & Answe…Search Formula -- Questions
sp_PrintTopic sp_TopicIcon
Search Formula -- Questions
Avatar
Patrick Hicok

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
September 17, 2019
sp_UserOfflineSmall Offline
1
September 17, 2019 - 1:02 am
sp_Permalink sp_Print

I am very new to Excel and fomulas, so please be gentle. 

I found an article that is exactly what I am looking for.

https://www.myonlinetraininghu.....t-of-words

I have data in Columns A and B.  The list is around 3500 row. I have a list in column H--named "list" and it contains 1400 items.  I want to match the "list" to words found in B, and place that in column C.  

So here is an example:

line of A and B:

REC      196 DATA   80 CHAR        OPER '5636 JOB J217386W' EXEC DOIT PARM='JOB=J217386W '

In Column H--the list column--the word J217386W is present

The formula I am using is:

=@INDEX(list,SUMPRODUCT(ISNUMBER(SEARCH(list,B3))*ROW($1:$1500)))

But all that returns in the #N/A with an error:  A value is not available to the formula or function.

What am I missing?   

sp_AnswersTopicSeeAnswer See Answer
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4443
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
September 17, 2019 - 7:54 am
sp_Permalink sp_Print

Hi Patrick,

The list should have an exact match to the data in column B. In your example, the list in column C should only contain J217386W as the rest of the text is not present in column B.

Can you remove everything other than the Job numbers from the list?

Mynda

Avatar
Patrick Hicok

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
September 17, 2019
sp_UserOfflineSmall Offline
3
September 17, 2019 - 11:16 am
sp_Permalink sp_Print

I've attached my file.  Perhaps you could give it a look and give some counselling and direction.  I really want to understand this without having to drop it in a database and running a query loop.

Thanks 

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4443
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
September 17, 2019 - 9:13 pm
sp_Permalink sp_Print

Hi Patrick,

This formula is handling arrays; list and ROW. You must ensure the arrays are the same size i.e. the list name should reference cells $H$1:$H$1416, not the whole column. And the ROW formula should reference rows $1:$1416.

You should also handle errors by adding an IF statement because not all job numbers are present in list:

=INDEX(list,IF(SUMPRODUCT(ISNUMBER(SEARCH(list,B2)))=0,NA(),SUMPRODUCT(ISNUMBER(SEARCH(list,B2)))*ROW(1:1416)))

Mynda

Avatar
Patrick Hicok

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
September 17, 2019
sp_UserOfflineSmall Offline
5
September 17, 2019 - 10:24 pm
sp_Permalink sp_Print

Should there be $ on the 1:1416 to lock the rows? 
=INDEX(list,IF(SUMPRODUCT(ISNUMBER(SEARCH(list,B2)))=0,NA(),SUMPRODUCT(ISNUMBER(SEARCH(list,B2)))*ROW($1:$1416)))

When I copy this down the rows in the without it, the numbers increase.

I changed to the above, and I still receive an #N/A in a cell I know to be a match, but just an #N/A with no error attached. 

I really am trying to understand this. 

The first part: (list,IF(SUMPRODUCT(ISNUMBER(SEARCH(list,B2)))=0,NA()
say if no match found, mark with NA

The second part: SUMPRODUCT(ISNUMBER(SEARCH(list,B2)))*ROW($1:$1416)))
is the doing the actually find and set to the Name if found. 

I understand what it is supposed to be doing, I just can't seem to get it to work.
I appreciate the time taken to educate a novice.

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4443
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
6
September 18, 2019 - 8:04 am
sp_Permalink sp_Print

Hi Patrick,

Yes, ROW reference should be absolute. In the file you attached the formula in cell C4 is looking up B2. I also noticed that there are duplicates in the list in column H which need to be removed to avoid #REF! errors. When you remove the duplicates, you have 475 records left.

You also haven't changed the range referenced by the named range; list, it's still referencing the whole of column H. It should be $H$1:$H$475 after removing the duplicate records. 

I gave you the wrong formula earlier as it was missing the double unary (--) characters. Here is the correct one:

=INDEX(list,IF(SUMPRODUCT(--ISNUMBER(SEARCH(list,B4)))=0,NA(),SUMPRODUCT((--ISNUMBER(SEARCH(list,B4)))*ROW($1:$475))))

Mynda
sp_AnswersTopicAnswer
Answers Post
Avatar
Patrick Hicok

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
September 17, 2019
sp_UserOfflineSmall Offline
7
September 18, 2019 - 1:24 pm
sp_Permalink sp_Print

Mynda,

Thank you ever so much.  I didn't understand the range thing on the list--it wasn't sinking in, but I do now. I also didn't know Duplicates mattered, but I now see they will. 

I appreciate the assistance and the patience. You rock! 

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: baber Tufail
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:
drsven
Annie Witbrod
wahab tunde
Cong Le Duc
Faisal Bashir
Ivica Cvetkovski
Blaine Cox
Shankar Srinivasan
riyepa fdgf
Hannah Cave
Forum Stats:
Groups: 3
Forums: 24
Topics: 6205
Posts: 27211

 

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