+ Reply to Thread
Results 1 to 3 of 3

Need help fixing code that causes one cell to change based on the entry in another ce

  1. #1
    Forum Contributor
    Join Date
    01-06-2004
    Posts
    118

    Need help fixing code that causes one cell to change based on the entry in another ce

    Parts of the following code work, parts don't. Can someone evaluate this and let me know how to fix it?

    Here's the breakdown:

    I want to enter a specific quantity in a cell and have a corresponding cell change based on the number entered in the first cell.

    SPECIFIC EXAMPLE:
    I enter a number <=3030 in Cell D1 and it automatically changes cell B1 from "43" to "408". Also, if cell D1 is empty, cell B1 defaults to "43".
    I enter a number <=8500 in cell D2 and it automatically changes cell B2 from "398" to "406". Also, if cell D2 is empty, cell B2 defaults to "398".

    I had help with this in another thread, but it started getting a bit convoluted.

    I'm very new to this and with help (and my own "logic") came up with the following code (I know it's broken and not ordered right, but I don't have a lot of knowledge with VBA but am trying to learn so go easy on me!! ):

    Please Login or Register  to view this content.
    BRIEF OVERVIEW:

    This is a customizable billing sheet. There are 2 columns (B and N) where certain item numbers (1 - 999) will be entered for customization purposes and then saved for each individual customer. The item numbers in those columns may be changed at any point depending on the customers needs. "43", "398", "406" and "408" are just 4 examples of some of the item numbers. Columns D and P contain the cells where the quantities for each item are entered. here's a screenshot:

    http://img.photobucket.com/albums/v6...EENCAPTURE.jpg

  2. #2
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,656
    Joshiah, can you lay out a table that shows your logic? It would be easier to code from something like this:

    Please Login or Register  to view this content.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013
    Posts
    17,652
    Josiah

    As I have mentioned on MrExcel, your code has logical conflict.
    See MrExcel.

+ 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