+ Reply to Thread
Results 1 to 6 of 6

VBA code to populate a cell based on 2 criteria

  1. #1
    Registered User
    Join Date
    06-12-2014
    Posts
    10

    VBA code to populate a cell based on 2 criteria

    So I'm new to VBA....learning...slowly....

    What I need is the VBA code that does the following:

    Look at column a, look at column b, if they are both populated look at column c if column c populated then do nothing if column c is not populated then populate column c with "no"

    What it will do is check every row until it quits seeing data in column a and b.

    (yes I realize this can be done in the access query however I am not allowed to modify the query to get the result I want)

    Thanks
    Last edited by dave84x; 06-12-2014 at 03:26 PM.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA code to populate a cell based on 2 criteria

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-12-2014
    Posts
    10

    Re: VBA code to populate a cell based on 2 criteria

    Sweet! Now how would I change the code to make it so this runs on sheet1 and sheet2 with the click of 1 macro button?

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA code to populate a cell based on 2 criteria

    Try:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-12-2014
    Posts
    10

    Re: VBA code to populate a cell based on 2 criteria

    Sweet! Works even more perfect. I need to get my head wrapped around the VBA.

    Thank you again.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA code to populate a cell based on 2 criteria

    You're welcome. Glad to help out and thanks for the feedback. Please comply with Forum Rule No. 9.

    9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.

+ 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. Is there a formula that will populate a cell w/ TEXT based on multiple criteria?
    By violenttuesday in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-11-2014, 03:46 PM
  2. [SOLVED] Populate Cell based on two criteria
    By her.rockstar in forum Excel General
    Replies: 5
    Last Post: 08-02-2013, 02:14 PM
  3. [SOLVED] Populate Cells based on Criteria of Another Cell
    By mkeys4 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 07-16-2013, 07:39 AM
  4. Replies: 8
    Last Post: 10-04-2011, 04:28 PM
  5. Replies: 9
    Last Post: 12-13-2010, 01:42 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