+ Reply to Thread
Results 1 to 5 of 5

VBA code for comparing a range of cells

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

    VBA code for comparing a range of cells

    I'm new to the VBA programming so does anaybody know to write a VBA code for a sheet ion a workbook that will compare a range od cells. I need to compare cells R59:R88 to cells BV59:BV88 and if the cells R59:R88 are a higher value than the BV59:BV88 then i want to display a warning message saying they do not have enough inventory.

    The cells R59:R88 are the result of a sum of L59:Q59 and on down. The user will manually enter in these cells.

    The cells BV59:BV88 are also a result of a sum of BP59:BU59 and on down again. The user will also manually enter data in these cells.

    Windows XP
    Excel 2003
    Thanks

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

    assigning ranges with values in VBA

    How can you assaign a range and assign the range a value in VBA?

    I have a range of R59 to R88 that i want to assign the value of each cell to then compare them with the range BV59 to BV88.

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: assigning ranges with values in VBA

    Obviously more detail is required.
    Please Login or Register  to view this content.

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

    Re: assigning ranges with values in VBA

    Well each cell will have a value in it that the user puts in, but i want to comapre the value in each cell to the value in the range of cells BV59:BV88. Which is also entered in manually by the user.

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: assigning ranges with values in VBA

    This code will compare the two cells
    Please Login or Register  to view this content.

+ 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