+ Reply to Thread
Results 1 to 2 of 2

How to record macro using filters in one column to fill other columns

  1. #1
    Registered User
    Join Date
    10-29-2018
    Location
    Santiago Chile
    MS-Off Ver
    Microsoft Office 2013
    Posts
    1

    How to record macro using filters in one column to fill other columns

    Hi,

    Thank you so much for your help. This is my problem.

    I try to use the information contained in one column to fill other columns. For example in col A, there are Product p1 and product p2.
    I would like to fill col B as follow:
    I filter Product p1 in col A, and write John in the first data cell of column B I copy downwards John in col B, so that at each time we have p1 in col A, we will have John in col B
    Then I filter Product p2, and write Paul in the first data cell of column B I copy downwards Paul in col B, so that at each time we have p2 in col A, we will have Paul in col B

    col A Col B
    p1 <-> John
    p2 <-> Paul

    If i do it manually I have no problem. Now I try to record a macro doing the same thing and it does not work.
    This is frustrating because I have to to the same work over and over again and it is time consuming
    Is there a way to do that automatically?.
    I tried with the IF function, and it works, theoretically, but for the problem I have to solve it is not practical because I have more or less 6 columns to fill (not only col B) and approximately 10 products, not only p1 and p2.
    Can you help me find a solution?
    This would make me save a of of time , so it is important for me to find a solution.
    Thank you so much for your time and help.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,937

    Re: How to record macro using filters in one column to fill other columns

    This should not be a difficult VBA solution, however, please attach a sample worksheet that is representative of your actual file. List the product and the associated name so that these can be aligned properly.

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Trying to record a macro that filters columns by cells that contain formulas
    By EdwardSnowden in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-30-2017, 10:06 AM
  2. [SOLVED] How to record a macro dropdown that will auto-fill cells.
    By maurerjl in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2016, 03:25 PM
  3. Replies: 0
    Last Post: 06-29-2014, 02:18 AM
  4. Help with Macro: I need to fill columns D-N only up till the row number in column A
    By zizou0178 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-19-2014, 02:16 PM
  5. Record changes to pivot table filters
    By Big_Kev in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-05-2013, 10:44 AM
  6. Add two columns and fill columns based on other column data
    By gcoug in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-21-2011, 06:52 PM
  7. creating a macro that filters differences in columns
    By chadder44 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-04-2010, 07:16 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