+ Reply to Thread
Results 1 to 6 of 6

Find 1st unique Value on Column and Insert certain Word on cell on left Column

  1. #1
    Registered User
    Join Date
    08-15-2013
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    3

    Find 1st unique Value on Column and Insert certain Word on cell on left Column

    Hello Im trying to create a Macro that will help me sort some data. I have an excel sheet and this what I want the finish product to be... that once I sort based on Column B.... I need the system to look for the first #1 and whereever the value of #1 is to Put a V on the same Row but in Column A.... for #2 for it to put a D on the same Row as the first #2 on the list but in column A...and so forth...
    Im tried Lookup but it restricts me to a certain cell value...i need for the system to place the letter values on column A no matter on what row it falls..? thanks for your help everyone.

    V 1 6,541.65
    1 6,615.38
    1 7,144.76
    1 7,273.08
    D 2 7,453.50
    2 7,518.93
    2 7,857.54
    2 8,140.91
    DDO 3 9,128.54
    3 9,196.97
    3 9,871.90
    3 9,901.72
    L 4 10,121.98
    4 10,439.17
    4 10,605.04
    4 11,085.75
    X 5 11,569.58
    5 11,676.52
    5 11,903.91
    5 12,168.60
    5 12,259.26
    P 91 12,331.43
    91 12,519.89
    91 12,625.17
    91 12,713.76
    91 12,826.40

  2. #2
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    27,573

    Re: Find 1st unique Value on Column and Insert certain Word on cell on left Column

    Hi,

    It's not clear to me whether the data you show is just in two columns or whether some, like V 1 6,541.65 is three columns. i.e.
    V 1 6,541.65
    or
    V 16,541.65

    Could you upload your workbook so that we can see the actual layout.
    Richard Buttrey

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    08-15-2013
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Find 1st unique Value on Column and Insert certain Word on cell on left Column

    Colomn A is where I need the values to be added after the macro finds the first line item in Column B... the thing is the number of line items (1's) will vary daily as will the number of #2,#3 etc... so i need to find a way to tell excel that no matter where it falls, for it to find the first #2 in column B and put a "D" on the Column A next to it. In column B, the #1 might vary between 1 thru 400 or so a day .... thanks


    Column A Column B
    V 1
    1
    1
    1
    1
    D 2
    2
    2
    DDO 3
    3
    3
    Etc 4
    4

  4. #4
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    27,573

    Re: Find 1st unique Value on Column and Insert certain Word on cell on left Column

    Hi,

    Would you upload your workbook with a selection of sample rows and manually add the results that you expect to see when the operation has been completed. I'm finding it difficult to visualise

  5. #5
    Registered User
    Join Date
    08-15-2013
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Find 1st unique Value on Column and Insert certain Word on cell on left Column

    SAMPLE.jpg

    hopefully it will work

  6. #6
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    27,573

    Re: Find 1st unique Value on Column and Insert certain Word on cell on left Column

    Please upload the workbook as requested.

    Show a before and after situation and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

    Please don't upload pictures. None of us are inclined to recreate your data when you have a workbook available - see guidelines in the Rules area of this forum.

+ 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. Find word in Column-cut row-insert into new sheet
    By Vrlac8 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2012, 03:28 PM
  2. VBA to enter a word, find said word in string of column & copy to another column
    By tuneloon in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-29-2012, 11:59 AM
  3. macro to find first blank cell in a column cut the value from left adjacent column
    By willykin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-01-2012, 09:23 AM
  4. Macro to search column with last value and insert TOTAL column to the left
    By sbara906 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-02-2009, 11:34 AM
  5. Find word in column and copy cell to the right
    By dariushou in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2008, 05:40 PM

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