I would like to take a string such as R0-H6-D2 and return a number (1-4) based on one of four values for R, H and D in a separate column for each. The attachment should make what I am trying to do clearer. Any help will be much appreciated!
I would like to take a string such as R0-H6-D2 and return a number (1-4) based on one of four values for R, H and D in a separate column for each. The attachment should make what I am trying to do clearer. Any help will be much appreciated!
Last edited by javeds; 01-12-2014 at 12:28 AM.
Your attachment is not valid ! Please attach the book again
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST
More we learn about excel, more it shows us, how less we know about it.
for chemistry
https://www.youtube.com/c/chemistrybyshivaansh
I have updated the attachment. Hope it is clearer now.
Find the attached !
If this helps don't forget to click the star icon(add rep icon) in the bottom left corner of my post!
Hi Hemesh,
Thanks for the help. Yes, your formula does what I wanted to do and I have given you the star! Here is a similar way to get the same results that I found out subsequent to my post:
For "R" =LOOKUP(MID(I34,2,2),{"0-","15","30","45";"1","2","3","4"})
For "H" =LOOKUP(MID(I44,6,1),{"6","7","8","9";"1","2","3","4"})
For "D" =LOOKUP(MID(I39,9,1),{"2","4","6","8";"1","2","3","4"})
Thanks again!
Here is another answer for this problem.
It uses the letters in the 1 row to lookup.
One test is worth a thousand opinions.
Click the * Add Reputation below to say thanks.
Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.
In future, to mark your thread as Solved, you can do the following -
Select Thread Tools-> Mark thread as Solved.
Incase your issue is not solved, you can undo it as follows -
Select Thread Tools-> Mark thread as Unsolved.
Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks