+ Reply to Thread
Results 1 to 3 of 3

VBA - Auto populate cells based on another tab

  1. #1
    Registered User
    Join Date
    06-30-2013
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    24

    VBA - Auto populate cells based on another tab

    Hey all,

    Could you please help me,
    I'm trying to Auto popular cells to make my life easier.

    Basically, in B6 on the "Auto" tab, is the name of the screen, followed by the start time of that screen in F6
    I'm wanting to put that into screen 6 on the tab named "FOH01" in H12

    Then the next time screen 6 shows up on the "Auto" tab is in B18, therefore that needs to go into the 2nd performance which is K12 in the "FOH01" tab...

    I'd be able to do something like that myself easily, however the "Auto" tab changes daily, therefore it can't be linked to the actual cell, it needs to be some sort of VBA coding

    Please let me know if you need more information
    Thanks for your help, it'll really be appreciated.
    Last edited by Lifeless; 02-11-2017 at 03:45 PM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: VBA - Auto populate cells based on another tab

    Put this formua in H12 to get the first instance of Screen 6.
    It's an array formula. Confirm with Ctrl+Shift+Enter
    =INDEX(Auto!$F$1:$F$100,SMALL(IF(Auto!$B$1:$B$100="Screen " & FOH01!A12,ROW(Auto!$B$1:$B$100),""),1))

    In K12, use the same formula but change the red 1 to a 2 to get the 2nd instance. You could drag copy the formulas up to get the other screen times. The formulas will automatically update when you change the data on FOH01
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    06-30-2013
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    24

    Re: VBA - Auto populate cells based on another tab

    Quote Originally Posted by AlphaFrog View Post
    Put this formua in H12 to get the first instance of Screen 6.
    It's an array formula. Confirm with Ctrl+Shift+Enter
    =INDEX(Auto!$F$1:$F$100,SMALL(IF(Auto!$B$1:$B$100="Screen " & FOH01!A12,ROW(Auto!$B$1:$B$100),""),1))

    In K12, use the same formula but change the red 1 to a 2 to get the 2nd instance. You could drag copy the formulas up to get the other screen times. The formulas will automatically update when you change the data on FOH01
    Brilliant, worked like a charm, thanks for your help AlphaFrog!

+ 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. Auto populate cell based another cells data
    By andyp24 in forum Excel General
    Replies: 2
    Last Post: 12-06-2016, 01:36 PM
  2. Macro to auto-populate cells based on content of other cells
    By BristolJGM in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-05-2015, 07:47 PM
  3. Auto-Populate Cells based on a dropwn
    By danallamas in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-27-2014, 12:57 AM
  4. [SOLVED] Can I Auto populate cells based on value in another cell
    By Rednecknerd in forum Excel General
    Replies: 2
    Last Post: 12-11-2013, 10:58 AM
  5. Replies: 3
    Last Post: 02-28-2012, 11:54 AM
  6. Auto-populate cell based on values in other cells
    By cyndimei in forum Excel General
    Replies: 8
    Last Post: 10-03-2008, 03:12 PM
  7. Auto populate cells based on 2 cells division.
    By Chance224 in forum Excel General
    Replies: 0
    Last Post: 04-04-2005, 05:06 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