+ Reply to Thread
Results 1 to 6 of 6

Formula/Macro that populates cells based on criteria

Hybrid View

  1. #1
    Registered User
    Join Date
    08-17-2015
    Location
    Dubai, UAE
    MS-Off Ver
    2013
    Posts
    6

    Formula/Macro that populates cells based on criteria

    Hello everyone, hope you are all doing well. I have been a long time lurker here and have learned quite a lot from these forums

    Here is my question:

    In the attached file, I want the button in the 'Input' sheet to populate rows in the 'Database' sheet based on the date.
    Ideally, I'd want to transpose paste the values because the column headings in the Database sheet will not be exactly the same as those in the input.
    For now to make it easier to understand, I've left them as A,B,C,D..etc.

    Thanks in advance

  2. #2
    Registered User
    Join Date
    08-17-2015
    Location
    Dubai, UAE
    MS-Off Ver
    2013
    Posts
    6

    Re: Formula/Macro that populates cells based on criteria

    Forgot to attach to original post.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-17-2015
    Location
    Dubai, UAE
    MS-Off Ver
    2013
    Posts
    6

    Re: Formula/Macro that populates cells based on criteria

    Please help

  4. #4
    Registered User
    Join Date
    08-17-2015
    Location
    Dubai, UAE
    MS-Off Ver
    2013
    Posts
    6

    Re: Formula/Macro that populates cells based on criteria

    Someone?
    This is a major roadblock for me.

  5. #5
    Registered User
    Join Date
    08-17-2015
    Location
    Dubai, UAE
    MS-Off Ver
    2013
    Posts
    6

    Re: Formula/Macro that populates cells based on criteria

    This is the current code:


    Sub Macro1()
    '
    ' Macro1 Macro
    '

    '
    Range("C6:C13").Select
    Selection.Copy
    Sheets("Database").Select
    Range("C8").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=True
    Sheets("Input").Select
    Range("D13").Select
    Application.CutCopyMode = False
    Range("C13").Select
    End Sub


    As you can see, it only pastes the values. I need to add a few lines which enable it to paste based on the contents of cell C5 in 'Input' and match it to one of the rows in column B in 'Database'

  6. #6
    Registered User
    Join Date
    08-17-2015
    Location
    Dubai, UAE
    MS-Off Ver
    2013
    Posts
    6

    Re: Formula/Macro that populates cells based on criteria

    In case someone has the same problem, here is the solution:

    http://stackoverflow.com/questions/3...ed-on-criteria

+ 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. macro to colour cells based on criteria
    By excelhelpseeker in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-11-2015, 10:41 AM
  2. Need Help: A Macro that can extract two cells based on the criteria in a 3rd cell
    By vbanoobz in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-03-2014, 12:41 PM
  3. Replies: 1
    Last Post: 08-28-2014, 12:48 AM
  4. [SOLVED] Macro for looping through cells and concatenating based on criteria
    By redlonghorn in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-02-2014, 05:18 PM
  5. [SOLVED] Formula Needed to count a range of cells based on criteria in 2 other cells
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-01-2013, 04:06 PM
  6. Replies: 0
    Last Post: 07-11-2012, 01:42 PM
  7. Replies: 3
    Last Post: 07-21-2009, 02: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