+ Reply to Thread
Results 1 to 7 of 7

how to compare column values with a code

  1. #1
    Forum Contributor
    Join Date
    07-01-2010
    Location
    Niles, Michigan
    MS-Off Ver
    Excel 2010
    Posts
    137

    how to compare column values with a code

    Does anybody know a VBA code that will check Cloumn R values against Column BV values? And if any cell in the same row in column R is greater than the cell in the same row in column BV then produce a pop up warning saying they don't have enough inventory.

    The cells in the cloumn R and BV are a result of a formula that is a sum and the user will manually type in the cells that the formula will read from.

    Please help.

    windows XP
    excel 2003

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: how to compare column values with a code

    Which column(s) would they enter the information into?

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Forum Contributor
    Join Date
    07-01-2010
    Location
    Niles, Michigan
    MS-Off Ver
    Excel 2010
    Posts
    137

    Re: how to compare column values with a code

    The user will be entering numbers into columns L thru Q and column R will be the sum of for those columns and then the user will be entering numbers in columns BP thru BU and column BV will be the sum of for those cells. The number of rows start at row 59 and go thru 303.

    Does that help

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: how to compare column values with a code

    Something like this:

    Please Login or Register  to view this content.

    Right click on the sheet tab, select view code and pop the code on the sheet that appears.

    Hope it helps,

    Dom

  5. #5
    Forum Contributor
    Join Date
    07-01-2010
    Location
    Niles, Michigan
    MS-Off Ver
    Excel 2010
    Posts
    137

    Re: how to compare column values with a code

    That works great but i only have 1 more small problem with this. And i'm sorry for not mentioning it earlier.

    As i enter data in columns L thru Q in removes the inventory in column BV.
    So Column L is for Monday, M is for Tueday and so forth. So say i have 200 in column BV and on Monday (column L) i enter 100. Column BV will now go from 200 to 100 and if i enter say 75 on Tuesday (column M) it says i don't have enough inventory which is what i want but the problem is i do have enough inventory. I should actually have 25 pieces left in column BV after i entered the 75 for Tuesday.

    Can you help on this one?

  6. #6
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: how to compare column values with a code

    Really? I just set up a quick dummy sheet and it happily let me enter 100 and 75 and then quibbled when I tried to pop 50 in for Wed. A sample workbook might help to see what is going on.

    Afraid I'm pretty busy this afternoon and off on my summer hols this evening but will check back if I get a chance.

    Dom

  7. #7
    Forum Contributor
    Join Date
    07-01-2010
    Location
    Niles, Michigan
    MS-Off Ver
    Excel 2010
    Posts
    137

    Re: how to compare column values with a code

    Thanks, i'll keep trying to see what i have wrong.

    Thanks again and have a great summer holiday.

+ 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