Forum

Notifications
Clear all

Formula if cell contain specific value

7 Posts
3 Users
0 Reactions
157 Views
(@waqasmunir)
Posts: 21
Eminent Member
Topic starter
 

I need a formula for Cell E5

if C5 contains text 10w and D5 is equal to 1-7000 then E5 should contain PK 057 

if C5 contains text 10w and D5 is equal 7000.1 to 12000 then E5 should contain PK 058  

if C5 contains text 10w and D5 is equal to 12000.1 to 17000 then E 5 should contain PK 059

Thanks in advance for your cooperation.

Waqas Munir 

 
Posted : 23/02/2021 8:44 am
Anders Sehlstedt
(@sehlsan)
Posts: 974
Prominent Member
 

Hello,

Have you tried using IFS or nested IF’s formula?

https://www.myonlinetraininghub.com/excel-nested-ifs-explained
https://www.myonlinetraininghub.com/excel-ifs-function

Do a try yourself and if you still need help just give a shout and show what formula you are struggling with.

Br,
Anders

 
Posted : 23/02/2021 7:25 pm
(@waqasmunir)
Posts: 21
Eminent Member
Topic starter
 
 
file is attached and formula is not working for the condition of 7001 to 12000
 
=IF(D5>=7000&D5<=12000,"PK 058",IF(D5>=12000,"PK 059",IF(D5<=7000,"PK 057")))
 
Please make correction.
 
 
 
 
 
 
 
Posted : 23/02/2021 9:50 pm
(@waqasmunir)
Posts: 21
Eminent Member
Topic starter
 

i forget to mention the condition of column c

please add it in the above formula if C=10w

 
Posted : 23/02/2021 10:31 pm
(@questvba)
Posts: 125
Estimable Member
 

Hi,

Here is a proposal but some information is missing to give an answer that works 100% of the time.

  1. What does c=10w mean? Will the cell contain only these three characters and no others? Can these three characters be included in a text, for example: 'Blabla 10w blibli'? It will not be the same search.
  2. What happens if the value is less than 1 or greater than 17000? An error message, do nothing?

BR,

Lionel

 
Posted : 24/02/2021 12:52 am
(@waqasmunir)
Posts: 21
Eminent Member
Topic starter
 

Dear Lionel Baijot

1.     C=10w and 10w is for ten wheeler vehicle in future i need condition for six wheeler vehicle also but for this time just for ten wheeler

2.     Less then and equal to 7000...here is 7000 is weight in kg.

these are three weights slabs 7000 and 7000 to 12000 and 12000 to 17000 for for now max weight is 17000kg

weight will fall in these three catagories 1-7000....7000.1 to 12000 and 12001 to 17000

i hope every this is clear now.

Also make correction in the under mentioned formula without column C condtion i.e 10 wheeler.

=IF(D5>=7000&D5<=12000,"PK 058",IF(D5>=12000,"PK 059",IF(D5<=7000,"PK 057")))

Thanks in advance for your cooperation.

 
Posted : 24/02/2021 4:02 am
(@questvba)
Posts: 125
Estimable Member
 

Then my proposal works (# post 5). See cells in green.

BR,

Lionel

 
Posted : 24/02/2021 5:01 am
Share: