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

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
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,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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