+ Reply to Thread
Results 1 to 6 of 6

Repeat Cell Values depending on Value in an Adjacent column

  1. #1
    Registered User
    Join Date
    04-03-2018
    Location
    Paris, France
    MS-Off Ver
    15.30
    Posts
    5

    Repeat Cell Values depending on Value in an Adjacent column

    Hello!

    I have a large excel file with multiplel marcos etc. that helps me import data from a CSV file from our head office in Japan into our ERP.
    Everything works very smoothly, but I have one minor issue that I just cannot wrap my head around...
    Attached is a simplified table that will help the task I need to achieve:

    Sheet A - DATA - This is the info that I receive from Japan
    Sheet B - CURRENT - This is what I currently achieve with a simple formula
    Sheet C - NEEDED - This is what I need to achieve > the colour should be repeated in each row that has the same reference (the first 7 characters of column A).

    I hope that the sample file helps illustrate what I need to achieve. Either VBA or a Formula would work for me, but I can't figure out the best way to approach this... any help would be much appreciated!

    Thanks in advance,

    Reno

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

    Re: Repeat Cell Values depending on Value in an Adjacent column

    Try this formulas for C2, D2, E2 and F2

    Please Login or Register  to view this content.
    See the file

  3. #3
    Registered User
    Join Date
    04-03-2018
    Location
    Paris, France
    MS-Off Ver
    15.30
    Posts
    5

    Re: Repeat Cell Values depending on Value in an Adjacent column

    Dear José,

    Thank you so much for your reply & help! Definitely going in the right directly - very neat! I looked into the code and adapted/facilitated it slightly which helps. But am still running into a problem if there are 5 colours for example. Please see updated sample file attached with the lines concerned in RED.

    Thanks so much for your help!

    Remo

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Repeat Cell Values depending on Value in an Adjacent column

    Hello Reno and Welcome to Excel Forum,
    Try the following:
    1) Select cell C2 on Sheet C,
    2) Paste the following formula into the formula bar:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    3) Press the Ctrl + Enter keys and drag the fill handle over to cell G2,
    4) While cells C2:G2 are still selected drag the fill handle of G2 down to G41.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    04-03-2018
    Location
    Paris, France
    MS-Off Ver
    15.30
    Posts
    5

    Re: Repeat Cell Values depending on Value in an Adjacent column

    Dear JeteMc,

    First of all, thanks a million for taking the time to respond and sorry for my slow reply.
    I just tested the formula you suggested and it works like a charm. Magic!
    Your help is really very much appreciated, thank you so much!

    All my best,

    Reno

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Repeat Cell Values depending on Value in an Adjacent column

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. [SOLVED] Combo Box Values depending on adjacent cells
    By Umair.711 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-03-2014, 02:51 AM
  2. [SOLVED] Inserting Values in a Cell Depending on Content in an Adjacent Cell
    By lowlybroker in forum Excel General
    Replies: 3
    Last Post: 03-20-2014, 01:23 PM
  3. [SOLVED] VBA for searching string in a column and copy rows depending on string in adjacent cell
    By xprakash in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-20-2013, 05:58 AM
  4. Macro to find all specific values in column and replace adjacent cell values
    By dblock02 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-23-2013, 06:03 AM
  5. Replies: 0
    Last Post: 09-06-2012, 04:06 AM
  6. Replies: 8
    Last Post: 08-25-2012, 04:27 AM
  7. Repeat rows depending on a certain cell value
    By abokhadiga in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-03-2010, 05:13 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