+ Reply to Thread
Results 1 to 4 of 4

Help with multiple macros

  1. #1
    Registered User
    Join Date
    03-05-2012
    Location
    Chicago
    MS-Off Ver
    2007
    Posts
    25

    Help with multiple macros

    I need some help making some macros for a spreadsheet I'm working on for a client.

    First, I've got a macro that highlights the entire line of a selected cell:

    Please Login or Register  to view this content.
    How can I edit this so that no lines are highlighted if multiple cells in different rows are selected, or if the selected cell is above row 7 the row it's in is not highlighted?



    Also, the way I have the workbooks set up, there's a master database workbook and another workbook used for taking inventory that pulls information from the master database. Each time an inventory is taken the file is saved in a history folder and can be pulled into the database sheet with this macro:

    Please Login or Register  to view this content.
    How can I edit this so that the user can update the values in the master sheet from the inventory sheet? In addition, if the user enters a date that doesn't have a file associated with it in the inventory history, how can I have Excel simply show an error dialog instead of showing an Open File dialog?


    There's also a couple macros I need help writing. On the master sheet, I have a hidden column on the left (col A in the example sheet) that says "Yes" if an item needs to be reordered. The Purchase Order pulls items in based on this column. How can I populate a list in a column of all of the vendors that need to be ordered from so that each vendor only appears once on the list and there's no blank cells?

    Example database sheet:Master database example.xlsx
    Last edited by Cyali; 05-09-2012 at 09:00 PM.

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

    Re: Help with multiple macros

    Possibly, at the beginning.
    Please Login or Register  to view this content.
    may be a solution

  3. #3
    Registered User
    Join Date
    03-05-2012
    Location
    Chicago
    MS-Off Ver
    2007
    Posts
    25

    Re: Help with multiple macros

    Great, thanks; that worked for my first issue. Is there an easy way to make it so that if a cell above row 7 is selected nothing is highlighted? If there's no easy way to do it, then it can just be ignored.

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

    Re: Help with multiple macros

    You can target a specific range,
    Check this out
    http://www.davesexcel.com/vbacodes.htm#858300135

+ 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