Please Help....multiple IF formula

SteveK251

New Member
Joined
Jun 5, 2021
Messages
6
Office Version
  1. 2019
Platform
  1. Windows
Hi. Really struggling with this! Need a formula that achieves the following:-

If the text in column B states POT then it needs to return the text of column C & D combined. So if Column C Text is DOC123 and column D Text is 801-010 it returns a value of DOC123801-010

However if it states POR in column b (not POT) then it returns the exact same text as in column D. So if POS it would only return a value of 801-010.

is the above possible?
Any help greatly appreciated.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
You can do that with
Excel Formula:
=IF(B2="POT",C2,"")&D2
Or if you want to leave the text blank if column B is empty then
Excel Formula:
=IF(B2="","",IF(B2="POT",C2,"")&D2)
 
Upvote 0
Thanks Jason but can i also get it to do the IF search for POR in same formula and return a different value (exact same text as column D)
 
Upvote 0
How about
Excel Formula:
=IF(B2="POT",C2&D2,IF(B2="POR",D2,""))
 
Upvote 0
Solution
This is almost working perfectly. Its my fault i forgot to say for POT in column B it can also display POT>. Either POT or POT> need to return C&D value. I assumed it would still work as would just pick up the POT element. Sorry.
 
Upvote 0
How about
Excel Formula:
=IF(LEFT(B2,3)="POT",C2&D2,IF(B2="POR",D2,""))
 
Upvote 0
can i also get it to do the IF search for POR in same formula and return a different value
My way of reading the original question was that POT should return the combination of C&D, anything else would only show D.

If that is the case then you don't need to check for POR, the formula assumes this by process of elimination. If it is not empty and it is not POT then it must be POR.
 
Upvote 0
Thanks for your help Jason. It was struggling with the POT> if it returned this is column B. I have managed to just add this to the previous IF formula you gave me for if just POT and all seems to be doing as hoped now. Thanks so much for this this. I Maybe coming back shortly with some more problems. :)
 
Upvote 0

Forum statistics

Threads
1,214,987
Messages
6,122,614
Members
449,090
Latest member
vivek chauhan

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