+ Reply to Thread
Results 1 to 6 of 6

Concatenate and IF function

  1. #1
    Registered User
    Join Date
    05-13-2015
    Location
    MIA
    MS-Off Ver
    2010
    Posts
    4

    Concatenate and IF function

    Hello, I am currently using the following formula to concatenate a 4 columns

    =CONCATENATE(G11,IF(H11="","","-"),H11,IF(I11="","","-"),I11,IF(J11="","","-"),J11)

    The result will show in column A.

    I need to add an extra column that it will "only" show in column A once the prior formula is done. For example:

    Now, column name output:

    DB-DB_Oracle-10.10.10.11(1)-oracle


    I need:

    EMEA_PL_9-DB-DB_Oracle-10.10.10.11(1)-oracle ==> the number after EMEA_PL_ must be sequential and it can be obtained from Sheet1, column F.

    Also, until the values are not added in columns G, H, I, J; EMEA_PL_## should not show up in column A.


    I have attached a file with the example.

    thanks
    Attached Files Attached Files

  2. #2
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Concatenate and IF function

    Hi
    See if this helps
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Concatenate and IF function

    How about

    =IF(COUNTA(G2:J2) = 4,"EMEA_PL_" & RIGHT(F2,LEN(F2)-8) & "-" & CONCATENATE(G2,IF(H2="","","-"),H2,IF(I2="","","-"),I2,IF(J2="","","-"),J2),"")
    Martin

  4. #4
    Registered User
    Join Date
    05-13-2015
    Location
    MIA
    MS-Off Ver
    2010
    Posts
    4

    Re: Concatenate and IF function

    thank you for taking the time helping me with this. It works perfect.

  5. #5
    Registered User
    Join Date
    05-13-2015
    Location
    MIA
    MS-Off Ver
    2010
    Posts
    4

    Re: Concatenate and IF function

    Hello again.
    I do not know if it is possible or not to do with Excel, but thanks to your help, i am using the below formula to create a sequential number in columns, to avoid repeated rows.

    Formula:
    =IF(AND(G2<>"",H2<>"",I2<>"",J2<>""),"EMEA_PL_"&ROW(A1)&"-","") & CONCATENATE(G2,IF(H2="","","-"),H2,IF(I2="","","-"),I2,IF(J2="","","-"),J2)

    Output:
    EMEA_PL_1-NET-OS_Other-123.123.123.123-oracleacct ==> the number 1 after EMEA_PL_ will become a 2 in the next row

    my question is the following, can this formula be changed to remove completely the sequential numbers and replace it by a random 4 digits number?

    thanks

  6. #6
    Registered User
    Join Date
    08-17-2012
    Location
    New York, New York
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Concatenate and IF function

    Try this

    Please Login or Register  to view this content.
    I just replaced "ROW(A1)" with "TRUNC(RAND()*9999,0)"

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Using the CONCATENATE function nested in an IF function
    By rottweiler_lvr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-07-2013, 10:02 PM
  2. Concatenate function
    By stephaniex3 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-23-2012, 09:22 AM
  3. If function, then Concatenate
    By bigroo1958 in forum Excel General
    Replies: 5
    Last Post: 04-27-2011, 02:33 PM
  4. Concatenate Function
    By pradeepdeepu_001 in forum Excel General
    Replies: 2
    Last Post: 01-21-2011, 06:51 AM
  5. CONCATENATE function
    By confu5ion in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-16-2010, 02:35 PM
  6. [SOLVED] Concatenate function in vba
    By camerons in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 06-14-2005, 08:05 PM
  7. Concatenate function
    By pboost1 in forum Excel General
    Replies: 1
    Last Post: 03-02-2005, 03:52 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1