+ Reply to Thread
Results 1 to 5 of 5

VBA code to generate Y or N in cells

  1. #1
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    VBA code to generate Y or N in cells

    I tried looking for an answer to this, but can't find what I need.

    I need a VB code that will generate a Y or N randomly in a range of cells (L7:L50) if there are no blank cells in J7:J50. If a cell in column J7:J50 is blank, then the VB code would do nothing.

    Can anyone help?
    Thanks.

  2. #2
    Valued Forum Contributor wenqq3's Avatar
    Join Date
    04-01-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    868

    Re: VBA code to generate Y or N in cells

    Please Login or Register  to view this content.
    Check this okie?
    -If the problem is solved, please mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved".

    -Always upload a workbook before start your question
    To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.

    +++ If my answer(s) helped you, please add me reputation by click on * +++

  3. #3
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: VBA code to generate Y or N in cells

    Thanks for the help, but your code needs some tweaking. It will fill in cells (L7:L50) with Y or N when there is information in that range. Could you please adjust your code so that it fills in cells (L7:L50) with Y or N when there is information in cells (J7:J50)?

    I don't know how to adjust your code to do that. Thanks.

  4. #4
    Valued Forum Contributor wenqq3's Avatar
    Join Date
    04-01-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    868

    Re: VBA code to generate Y or N in cells

    Please Login or Register  to view this content.
    Check this thanks

  5. #5
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: VBA code to generate Y or N in cells

    Thanks. It works.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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