If statement help please

ariel20029

Board Regular
Joined
Jun 20, 2013
Messages
97
Hi,
I have column A that has a project ID and a column that has a role related to that project. There can be multiple rows per project:
I am trying to concatenate the multiple roles per project into one cell per project.

Example
Project ID Field ID
A Consultant
A Sr Consultant
A Project Manager
B Project Manager
C Sr Consultant
C Project Manager

The result I am trying to get

A-Consultant,Sr Consultant,Project manager
B-Project Manager
C- Sr Consultant, Project manager
I tried a few variations of if statements but could not get it to work.
Any help is appreciated.

thank you so much,
Sharon
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi,
I have column A that has a project ID and a column that has a role related to that project. There can be multiple rows per project:
I am trying to concatenate the multiple roles per project into one cell per project.

Example
Project ID Field ID
A Consultant
A Sr Consultant
A Project Manager
B Project Manager
C Sr Consultant
C Project Manager

The result I am trying to get

A-Consultant,Sr Consultant,Project manager
B-Project Manager
C- Sr Consultant, Project manager
I tried a few variations of if statements but could not get it to work.
Any help is appreciated.

thank you so much,
Sharon

Hi thank you, but that code did not work. It did not loop and only returned the first item it found. I probably did something wrong but I followed the directions twice.. thanks for trying though.
 
Upvote 0

Forum statistics

Threads
1,214,958
Messages
6,122,475
Members
449,087
Latest member
RExcelSearch

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