+ Reply to Thread
Results 1 to 9 of 9

Make unique Title in Column F if Column A match [VBA]

  1. #1
    Registered User
    Join Date
    01-23-2010
    Location
    Brisbane
    MS-Off Ver
    Excel 2003
    Posts
    20

    Make unique Title in Column F if Column A match [VBA]

    Hi
    I would like to make sure that Titles in a spreadsheet (column F) are slightly different in some way IF the corresponding data in column A is the same.

    What I mean will be clearer in the attached sample sheet that I have attached.
    I have marked up the sheet as I think it would be easier to understand than to try and convey clearly the intentions here.

    Thanks

    PS A VBA solution would be preferable if possible but I would look at non VBA suggestions as well.
    If I have an idea how to tackle this then I may be able to write it in VBA myself - I'll give it a go.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    07-25-2012
    Location
    Winterville, NC
    MS-Off Ver
    Excel 2013
    Posts
    141

    Re: Make unique Title in Column F if Column A match [VBA]

    Hmmm...I'm still a little confused after reviewing your spreadsheet. So are you saying, using rows 4-5 as an example, that you don't want F4 and F5 to be the same because A4 and A5 are different? So do you just want them highlighted to bring them to your attention or do you want them changed to something different. Just highlighting them shouldn't be a problem. I will wait for your response.

  3. #3
    Registered User
    Join Date
    01-23-2010
    Location
    Brisbane
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Make unique Title in Column F if Column A match [VBA]

    Hi
    Okay - firstly there is no highlighting required.

    I just highlighted the spreadsheet (ie rows 4 & 5 in green) to show that these were okay as per the comment lower down (row 26).
    "You will notice that the 2 entries in row 4 & 5 share the SAME TITLE but are OKAY because the entries in column A are different"

    The pinkish highlighted rows was just to emphasis rows 9 to 11 needed attention. There was a comment lower down as well.
    "These 3 entries (rows 9 to 11) share the same entry in column A and this is OKAY" and
    "They also share the same title in column F which is not OKAY"

    I only used highlighting to support the comments on the spreadsheet.

    Sorry if that caused confusion,my apologies.

    What I am hoping to achieve is - If Column A entries are the same then Column F entries cannot be the same.

  4. #4
    Registered User
    Join Date
    12-16-2014
    Location
    Amsterdam, Nederland
    MS-Off Ver
    Excel 2013
    Posts
    71

    Re: Make unique Title in Column F if Column A match [VBA]

    Hi,

    See attached file with a conditional formatting applied.
    For all cell in column f of teh table:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Bas

    Any reputation is appreciated.

  5. #5
    Registered User
    Join Date
    01-23-2010
    Location
    Brisbane
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Make unique Title in Column F if Column A match [VBA]

    Hi bartelba
    Thanks for the info - something new I have learnt today that I can utilize on another unrelated spreadsheet.

    The current spreadsheet has no highlighting requirements.
    I am looking at having uniquely different titles if values in column A match

    Cheers

  6. #6
    Forum Contributor
    Join Date
    07-25-2012
    Location
    Winterville, NC
    MS-Off Ver
    Excel 2013
    Posts
    141

    Re: Make unique Title in Column F if Column A match [VBA]

    How do you want us to differentiate that there's a duplicate though? You say you want the titles to be different...so you want a formula that's going to change the title for you? Or you want a formula that's going to let you know there's duplication and you need to attend to it? Am I making sense?

    When you say this
    Quote Originally Posted by paul_j_ View Post
    What I am hoping to achieve is - If Column A entries are the same then Column F entries cannot be the same.
    --- how do you want us to let you know this is a problem?

  7. #7
    Registered User
    Join Date
    01-23-2010
    Location
    Brisbane
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Make unique Title in Column F if Column A match [VBA]

    Hi acroley1
    The purpose of the formulae is to alter the filename in column F. No highlighting is required.

    The filename in Column F needs to be different if currently they are the same and the data in column A is the same.

    I have created an XML file generator that reads the data from a spreadsheet and creates numerous xml files for use in a 3rd party software package and it it works well.

    One XML file for each row of data (ie: if there are 300 rows then I have 300 XML files).
    It's not the ideal situation but I am constrained by the input requirements of the 3rd party program.

    I have found that if this other program receives more than one XML file that share the same data (from column A) and the same data (from column F) then it will not import the second copy.

    The data in column A can't be changed as that is used as part of a linking process in this 3rd party program (ie: attach to chapter / sub-chapter number)
    If the title from column F is slightly different then this 3rd party program will import all the data.

    I was looking at making the entries in column F different if they share common data in column A so that when the XML files are generated they would import OK in this other program.

    I have attached an image to hopefully clarify what I mean.
    Image1.jpg

  8. #8
    Registered User
    Join Date
    01-23-2010
    Location
    Brisbane
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Make unique Title in Column F if Column A match [VBA]

    Hi
    Well I dabbled around with VBA and got a reasonable enough fix for what I was after.
    It is not snazzy coding or anything, but will do.
    R_COUNT is read from another worksheet and supplies the row number for the last entry to be processed in the loop.



    Please Login or Register  to view this content.

    Bye.
    Last edited by paul_j_; 06-10-2015 at 02:29 AM. Reason: text wrapping / Code Tagging

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Make unique Title in Column F if Column A match [VBA]

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ 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. Replies: 7
    Last Post: 06-27-2014, 02:26 AM
  2. Replies: 6
    Last Post: 11-19-2013, 11:43 PM
  3. Replies: 20
    Last Post: 04-15-2013, 01:06 PM
  4. Find unique number in columns and return column title
    By mkvassh in forum Excel General
    Replies: 3
    Last Post: 10-21-2010, 10:29 AM
  5. How to Make one column to accept only unique value
    By Tanny in forum Excel General
    Replies: 6
    Last Post: 03-21-2005, 03:23 AM

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