IF Formulas that can return same value

Napolo

New Member
Joined
Nov 7, 2013
Messages
22
Is there a way to create an IF statement that will locate a cell and if they find text to return something particular or keep the current value?

My IF statements are rusty.

EXAMPLE:

ColumnA ColumnB
Description Contact Type
Travel A
Session A

In Column B, I am trying to enter the below.
=IF(A2="Travel","K",B2)


Ultimately changing column B to the below:

Description Contact Type
Travel K
Session A


Hope this makes sense.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
You could use that formula in col C to provide the K result. Otherwise, you cannot have a formula and a manually entered value in the same cell. Also, formulas cannot change cells other than the cell they are placed in.

If A is a given value, you COULD use your formula like this in col B:

=IF(A2="Travel","K","A")

If A is a manually entered value, then you would need to use the formula in col C or elsewhere.
 
Upvote 0
Ok that makes sense.

How about if I use the below and if the K1 is blank, how do i return a blank field? Right now it is pulling in a zero.

=IF(A1="Travel","K",K1)
 
Upvote 0
You could modify it like so:

=IF(A1="Travel","K",IF(K1="","",K1))
 
Upvote 0
If K1 would contain text values and not numbers, then this would also work:

=IF(A1="Travel","K",T(K1))
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,623
Latest member
Techenthusiast

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