How to display values based on different texts from another column

Nellycorn

New Member
Joined
Mar 14, 2022
Messages
15
Office Version
  1. 365
Platform
  1. Windows
Hello,
Can anyone please help make a formula that will display various values on a column, based on different texts from another column.
Here are the texts (quotations included) and the values to display on another column based on the texts
Text=Value
"00"=300
"0"=360
"1"=420
"2"=420
"3"=420
So far the this the only formula I figured out that managed to make this work:
1647284457245.png

1647284397735.png

But because I added + in the formula, the value for "0" gets added with the value of "00". e.g the value for "0" is 360 and the value for "00" is 300,
when I type 300 as the value for "00" in the formula, it shows in column B as 660 because the value from "0" is adding to the value of "00".
However, I just want a formula that would automatically display the right values on Column B, based on the text from Column A. Please help, I would really appreciate it.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Why not just set-up a lookup table, and use a VLOOKUP formula?
See: How to use the Excel VLOOKUP function | Exceljet

Or you could use a formula like this:
Excel Formula:
=LOOKUP(A4,{"00","0","1","2","3"},{300,360,420,420,420})[/
[/QUOTE]

Hello,
Can anyone please help make a formula that will display various values on a column, based on different texts from another column.
Here are the texts (quotations included) and the values to display on another column based on the texts
Text=Value
"00"=300
"0"=360
"1"=420
"2"=420
"3"=420
So far the this the only formula I figured out that managed to make this work:
View attachment 60058
View attachment 60057
But because I added + in the formula, the value for "0" gets added with the value of "00". e.g the value for "0" is 360 and the value for "00" is 300,
when I type 300 as the value for "00" in the formula, it shows in column B as 660 because the value from "0" is adding to the value of "00".
However, I just want a formula that would automatically display the right values on Column B, based on the text from Column A. Please help, I would really appreciate it.
Also, I forgot to mention that I don't want to use a table. I have multiple tables on my file so I want to keep it as few as I can. I hope that's possible
 
Upvote 0
Also, I forgot to mention that I don't want to use a table. I have multiple tables on my file so I want to keep it as few as I can. I hope that's possible
Did you look at/try the formula I posted at the bottom of first reply that does not require a table?
 
Upvote 0
Hi,

If the values in column A actually has the quote marks around them (e.g. "00", "0"), try this:

Book3.xlsx
ABC
2300
3
4"00"
Sheet1056
Cell Formulas
RangeFormula
C2C2=LOOKUP(2,1/SEARCH({"00","""0""","1","2","3"},A4),{300,360,420,420,420})
 
Upvote 0
Solution
Why not just set-up a lookup table, and use a VLOOKUP formula?
See: How to use the Excel VLOOKUP function | Exceljet

Or you could use a formula like this:
Excel Formula:
=LOOKUP(A4,{"00","0","1","2","3"},{300,360,420,420,420})
Hi Joe4, sorry I forgot to mention (and I don't know how to edit my post cause I'm new here) that I don't want add a table to make the formula because I already have a lot of tables in my original file so I just want a formula (if that's possible) but thank you very much, I'll use it if I really have to :)
 
Upvote 0
So have you tried the formulas in Post #2 by Joe4, and mine in Post #5 ???
 
Upvote 0
Hi Joe4, sorry I forgot to mention (and I don't know how to edit my post cause I'm new here) that I don't want add a table to make the formula because I already have a lot of tables in my original file so I just want a formula (if that's possible) but thank you very much, I'll use it if I really have to :)
You did mention it in your prior post, and I responded back already indicating that I posted a non-table formula option at the bottom of my initial reply.
 
Upvote 0
You did mention it in your prior post, and I responded back already indicating that I posted a non-table formula option at the bottom of my initial reply.
Oh my bad, I should have expanded on your post (sorry again, just joined this site so I wasn't smart to pick that up lol). Thank you for your consideration, I did try it out the non table formula and it ended up as N/A but jtakw's formula did work. Again, Thank you for the help, I appreciate it :)
 
Upvote 0
So have you tried the formulas in Post #2 by Joe4, and mine in Post #5 ???
Hello, yes I did try both and yours did work :D. Thank you so much, you have relieved me from the ton of further stress from out the formula myself <3
 
Upvote 0

Forum statistics

Threads
1,214,793
Messages
6,121,614
Members
449,039
Latest member
Mbone Mathonsi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top