Computer Learning Zone CLZ Access Excel Word Windows

If you can't make it good, at least make it look good.

-Bill Gates
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Excel Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Complex Formula - Hope you can help
David 

16 years ago
Hey there,

I would need a formula or a macro that would have the ability to recognize specific text in a column and assign the text a value to be counted up and the final numbers to be displayed.

For Example if I had a column that states the following

HALFBATH:1;FP:1;AC:SPLIT SYSTEM;POOL:CONCRETE;Sewer:PUBLIC;

I need a formula/macro that would be able to recognize "HALFBATH" and give it a value of 1 for this example. It would recognize "AC:SPLIT SYSTEM" assign it a value of 2. Assign "POOL" a value of 3, etc. These values would then be added together to display a value, in this case, 6 in an adjacent column. If you could get me started I think I can run with it. I would need this to be expandable to more text & values. Is something like this do-able? Thanks for your help.


Answer from Richard Rost:

I wouldn't try to do this in one formula, as it will get crazy, but you could break it up into multiple columns, one for each keyword you're trying to find, and then add up all of the values.

Here's an example. Put the following values in these cells:

B1: SYSTEM
B2: 5
C1: POOL
C2: 7

Those are your keywords and their values. Now, put the long code you're searching for in A4:

SOMETHING;POOL;

Now in B4, you can look to see if "SYSTEM" is in A4. If so, use your assigned value.

=IF(IFERROR(FIND(B1,$A$4),0),B2,0)

Do the same for C4:

=IF(IFERROR(FIND(C1,$A$4),0),C2,0)

Now you can add all of these values up across the row, and that should give you the value you want.

Hope this helps get you started.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Excel Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/18/2026 7:54:02 AM. PLT: 0s