Nesting/combining functions into one formula

Jewells0905

New Member
Joined
Mar 10, 2024
Messages
29
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Good Morning,

I am fairly new to all the things Excel can do. I am currently taking a course to learn more but am having the hardest time with combining multiple functions into one formula. Does anyone have any tips/tricks to remember how to do so and avoid errors? Ex if I have Column A that has either m or f for gender, and Column B has names and addresses, but all the prefixes are Ms. How would I combine substitute and IF to search column A for Ms or Mr and then correct the Ms in column B? Example below, none of these are actual people's addresses. I would assume I would need to use a formula along the lines of this, =SUBSTITUTE(B2,"Ms.",IF(A2,"f","Ms.","Mr."),2) - however it gives me an error, stating it's the wrong number of arguments. I've tried a couple of other ways as well with errors. Any help is greatly appreciated as I have not been able to find much online to help with how to order multi function formulas.

GenderWrong AddressCorrect Address
fMs. Mary Smith 787 Madison Lee's Summit MO
mMs. Robert Johnson 3728 Hilltop Blue Springs MO
mMs. John Williams 8555 Aspen Lee's Summit MO
fMs. Linda Brown 9299 Sunrise Raytown MO
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
How about
Excel Formula:
=IF(A2="f",B2,SUBSTITUTE(B2,"Ms.","Mr."))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 1

Forum statistics

Threads
1,215,068
Messages
6,122,950
Members
449,095
Latest member
nmaske

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