+ Reply to Thread
Results 1 to 4 of 4

Insert a new Column when there's none under certain conditions

  1. #1
    Registered User
    Join Date
    12-04-2018
    Location
    Anonym
    MS-Off Ver
    Excel 2016
    Posts
    2

    Insert a new Column when there's none under certain conditions

    Hey Guys

    I'd like to create a VBA Script for the following task:

    I have an Excel Sheet with numbers, which are categorized in A B and C. Unfortunately, some numbers are missing (there's like a column with B and 8, and another with B and 10, but not with B and 9), so i'd like to create a Script which inserts those missing columns. Do you know how this would be possible?

    Thanks for your help.

    Kind regards


    Gabe

  2. #2
    Forum Moderator - RIP 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
    29,464

    Re: Insert a new Column when there's none under certain conditions

    Hi and welcome to the forum.

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.
    Richard Buttrey

    RIP - d. 06/10/2022

    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
    12-04-2018
    Location
    Anonym
    MS-Off Ver
    Excel 2016
    Posts
    2

    Re: Insert a new Column when there's none under certain conditions

    Hi Richard

    Okay sure, I can do that:

    I have to excel sheets. Both have ID-Numbers, which are representing personal Information on the first Sheet (Name, Adress, etc.) and a Score on the other sheet. Unfortunately, some ID-Numbers are missing on the score-sheet, because not every peron has a score, so that's why some ID's are missing on the second sheet. But now I need to merge this to Sheets together, so they can analyze the data.

    So here's an example:

    That's how it is:
    A 1
    B 1
    C 1
    A 2
    C 2

    And this is how it should be:

    A 1
    B 1
    C 1
    A 2
    B 2
    C 2
    Last edited by gabeBU; 12-04-2018 at 06:05 AM.

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

    Re: Insert a new Column when there's none under certain conditions

    It isn't clear to me as to why you would need to list, on the score sheet, the ID's of the employees whom do not have scores. It would seem that indexing the scores to match the ID's on the personal information sheet would be all that is needed to do analysis.
    It may help to clear things up if you would, as Richard requested, upload a sample of your workbook by clicking on the GO ADVANCED button below the Quick Reply window and then scrolling down to Manage Attachments to open the upload window.
    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.

+ 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] Insert value from cell when three conditions in row are met
    By mpoppen in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-28-2017, 07:21 AM
  2. insert a new column based on conditions
    By BORUCH in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-07-2017, 11:01 AM
  3. Insert rows in conditions
    By chris4204 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-02-2015, 04:13 AM
  4. How to insert more conditions in if-statement
    By dannyjoer in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-06-2014, 04:51 AM
  5. Insert Vlookup Depending On Certain Conditions
    By TkdKidSnake in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2014, 06:14 PM
  6. How to insert rows+add based on the conditions
    By RookieOfTheYear in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-03-2012, 09:45 AM
  7. Insert rows by mulitble conditions
    By vane0326 in forum Excel General
    Replies: 0
    Last Post: 02-03-2005, 09:51 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