+ Reply to Thread
Results 1 to 2 of 2

Data not populating from additional ElseIf arguments

  1. #1
    Registered User
    Join Date
    05-15-2019
    Location
    Wales
    MS-Off Ver
    2016
    Posts
    9

    Data not populating from additional ElseIf arguments

    I'm in the process of creating a VBA script to see if a laptop has been discovered by the network in the past 30 days. Different devices are managed by different discovery tools which generate their own reports. The attached sample is the consolidation sheet I created to manage them. I then use this sheet to record who've I've contacted and then advise senior managers about the status of these devices.


    The macro I'm having issues with is one that updates the cells with their current status;
    If the status is IN INVENTORY its no longer in use and the query is resolved (the Last Audit date is the last change to the asset management database)
    I don't report on devices managed by AirWatch, any discovery there is marked as exempt.
    If the device has been discovered in the past 30 days using either CMDB, SCCM or InTunes the query is resolved.

    Column U should be either blank, "EXEMPT" or "YES"
    Column V should have the date it was discovered or the last audit date
    Column W should be populated with a note saying where the information came from.


    The macro should populate the end columns in the following priority order IN INVENTORY> AirWatch> CMDB>SCCM>InTunes before moving onto the next line.


    The following code works for IN INVENTORY, AirWatch and CMDB but won't populate lines where there's a SCCM or InTunes match

    My VBA Code is;
    Please Login or Register  to view this content.
    Any help would be greatly appreciated

    -----------
    I worked it out, I should have been using AND statements instead of an additional IF statement
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by MattEvansC3; 05-07-2020 at 06:26 AM. Reason: Adding CODE tags

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Data not populating from additional ElseIf arguments

    Hello MattEvansC3,

    No Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Error Wrong number of arguments to IF. Expected between 2 and 3 arguments, but got 4 argum
    By tommystanek in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-11-2019, 12:10 PM
  2. [SOLVED] When ElseIf condition is met, the statements under elseif are not happening.
    By excelkann in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-07-2016, 12:40 PM
  3. [SOLVED] Better way to select data using if and elseif. Case selection
    By philbennison in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-20-2014, 12:10 PM
  4. [SOLVED] modify array formula for additional arguments
    By neowok in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-25-2013, 08:14 AM
  5. Code stepping in to elseif statement when elseif is definitely not true
    By DFrank231 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-13-2013, 05:31 PM
  6. Populating additional sheets with data from sheet 1 depending on info in cell
    By kd1950 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2012, 09:42 PM
  7. If Elseif elseif problem
    By tjbillund in forum Excel General
    Replies: 3
    Last Post: 08-10-2011, 07:02 AM

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