IF formula

danielryle

New Member
Joined
Mar 2, 2022
Messages
9
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hi all,

Relative beginner here, sorry!

I currently have a formula that is producing the result I need,

'=IF(E10>=30,"3",IF(E10>=23,"2",IF(E10<23,"1", "")))'

1646239957227.png


However if the cell contains text or is blank as shown above, I would like the resulting cell to be empty. How do I change my current formula to achieve this.

Many thanks,

Dan
 
If you need the result to be numeric, then you cannot have text in the cell. However you could use a custom cell format to make it look as though the word "number" is there.
apologies i should probably clarify I wouldn't need the word 'number' there, just a numerical value :)
 
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
apologies i should probably clarify I wouldn't need the word 'number' there, just a numerical value :)
There are many ways to do this, from Nested IFs, VLOOKUP, INDEX/MATCH, LOOKUP, etc.
Depending on, for example, How many different words you have, and the values you want returned.

Note: Mods may suggest you open a new thread for your new question.
It would just be two possible answers so two words and then two subsequent numerical values depending on the answer
 
Upvote 0
In that case you need to give a better example of exactly what you have & what you want.
But as it is a significantly different question, then it needs a new thread. Thanks
 
Upvote 0
If there could only be 2 possible values in E10 (e.g. word1, word2), then F10 formula will do, otherwise, use G10 formula:

Book3.xlsx
EFG
10word2 
Sheet1026
Cell Formulas
RangeFormula
F10F10=IF(E10="word1",1,2)
G10G10=IF(E10="word1",1,IF(E10="word2",2,""))
 
Upvote 0
If there could only be 2 possible values in E10 (e.g. word1, word2), then F10 formula will do, otherwise, use G10 formula:

Book3.xlsx
EFG
10word2 
Sheet1026
Cell Formulas
RangeFormula
F10F10=IF(E10="word1",1,2)
G10G10=IF(E10="word1",1,IF(E10="word2",2,""))
Hi there,

I have posted another thread but linked to this original thread. If you have any ideas it would be much appreciated!


Thanks
 
Upvote 0

Forum statistics

Threads
1,214,982
Messages
6,122,580
Members
449,089
Latest member
Motoracer88

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