Solved

Update concatenated excel formula to include additional criteria

Posted on 2014-10-08
3
118 Views
Last Modified: 2014-10-09
Attached is a sample spreadsheet implementing a formula (in Column G). I would like this formula revised. Column I shows the desired results I am looking for. I've outlined the background details of the existing formula and included the updated criteria change at the end.

CRITERIA OF EXISTING FORMULA:
I would like Column G to concatenate different columns, including a specific string within one column, based on various criteria outlined below:

 If D = "CAD" or "TREP", AND H = "VOL 1" then Column G to concatenate as follows:
 G = B + D + C [first word after closing bracket OR first second word in string if no closing bracket] + F
 Otherwise, Column G to concatenate as follows:
 G = B + D + E + F

CURRENT FORMULA:
=IF(AND(H2="VOL 1",OR(D2="CAD",D2="TREP")),B2&"-"&D2&"-"&LEFT(TRIM(IF(FIND(")",C2)<>LEN(C2),MID(C2,FIND(")",C2)+1,100),MID(C2,FIND(" ",C2)+1,100))),FIND(" ",TRIM(IF(FIND(")",C2)<>LEN(C2),MID(C2,FIND(")",C2)+1,100),MID(C2,FIND(" ",C2)+1,100))))-1)&IF(F2<>"","-"&F2,""),B2&"-"&D2&IF(E2&F2="","","-"&E2&F2))

CRITERIA OF UPDATED FORMULA:
As above, except that H = "VOL 1" or "VOL 7" or "VOL 12" (formerly H = "VOL 1")

Thanks,
Andrea
EE-Sample-Concat-2Part-Updated.xlsx
0
Comment
Question by:Andreamary
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
Comment Utility
Hi,

Try this (inserted in G2 and copied down):
=IF(AND(OR(H2="VOL 1",H2="VOL 7",H2="VOL 12"),OR(D2="CAD",D2="TREP")),B2&"-"&D2&"-"&LEFT(TRIM(IF(FIND(")",C2)<>LEN(C2),MID(C2,FIND(")",C2)+1,100),MID(C2,FIND(" ",C2)+1,100))),FIND(" ",TRIM(IF(FIND(")",C2)<>LEN(C2),MID(C2,FIND(")",C2)+1,100),MID(C2,FIND(" ",C2)+1,100))))-1)&IF(F2<>"","-"&F2,""),B2&"-"&D2&IF(E2&F2="","","-"&E2&F2))

I've bolded the key change to your formula.

Regards,
-Glenn
0
 

Author Closing Comment

by:Andreamary
Comment Utility
Thanks very much, Glenn!
0
 
LVL 27

Expert Comment

by:Glenn Ray
Comment Utility
You are welcome.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now