if statement + concantenate

jlugo

Board Regular
Joined
Aug 12, 2011
Messages
146
Hi,

What formula would satisfy these parameters (if statement + concantenate):

If f5=h5 then display only f5, if not, display the concantenation of f5 + " " + h5


Thanks!
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Ok wait, I spoke too soon.
Some fields that are the same value are combining "205 205". No spaces so not sure what's is the problem? I made sure both columns were converted to text.
 
Upvote 0
Ok wait, I spoke too soon.
Some fields that are the same value are combining "205 205". No spaces so not sure what's is the problem? I made sure both columns were converted to text.

Does...

=if(trim(f5)=trim(h5),trim(f5),trim(f5&" "&h5))

escape the problem?
 
Upvote 0
It made a huge difference.

One more criteria.

If the new concatenated column has a number that shows up more than once on either the column on the left or on the right of the new one, then just display the repeating number instead of concatenating the two.
How would we modify this to that?

Goal is to get expenses together creating some unique identifier but still grouping those with the same identifier.
 
Last edited:
Upvote 0
It made a huge difference.

One more criteria.

If the new concatenated column has a number that shows up more than once on either the column on the left or on the right of the new one, then just display the repeating number instead of concatenating the two.
How would we modify this to that?

Goal is to get expenses together creating some unique identifier but still grouping those with the same identifier.

Would you try to exemplify?
 
Upvote 0

Forum statistics

Threads
1,226,730
Messages
6,192,711
Members
453,748
Latest member
akhtarf3

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