Link to home
Start Free TrialLog in
Avatar of vegas86
vegas86

asked on

Formula advice on how to return value based on specific text within string

Hello,

Can someone please help me? I have attached an example of what I am working on.
I need my formula to look for specific text and then return a number based on that text. You will see that in A2 I have =IF(ISNUMBER(SEARCH("Weekdays SchHols",A5)),"62") and in B2 I have =IF(ISNUMBER(SEARCH("weekdays",A5)),"42") but these two formulas are working off one value- A5. What I want to be getting is the value of 62 because that’s what I have specified for Weekdays SchHols but it is picking up Weekdays on its own as well. Is there a way to narrow it down to only provide me with the one value.
In saying this though I need my formula to include all 5 names written in column I with the corresponding value in column J, so if it has Sunday in the range it will return 14, if Saturdays was in the range it would instead return 12.

Can someone please help me out and let me know how I would go about solving this?

example.xlsx
Avatar of zorvek (Kevin Jones)
zorvek (Kevin Jones)
Flag of United States of America image

You will probably need to make the formulas more dependent on each other.

See attached.

Kevin
Q-26946372.xlsx
Avatar of vegas86
vegas86

ASKER

Hi Zorvek,

Thanks for your suggestion it works well but unfortunately I can’t do that in this situation, I only included two formulas as an example. My real sheet only has one formula and within that formula I need it to include all 5 ranges so that when a selection is made from a data validation list in column A the formula will automatically return the correct number value in column B.

Thanks though!
ASKER CERTIFIED SOLUTION
Avatar of zorvek (Kevin Jones)
zorvek (Kevin Jones)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vegas86

ASKER

Just tried it then and it's fantastic, thanks for your help and time Kevin!! I appreciate it!