+ Reply to Thread
Results 1 to 4 of 4

Using named range to clear cell data

  1. #1
    Registered User
    Join Date
    10-17-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Using named range to clear cell data

    Hi, long time reader first time poster.

    Thanks for all your tips and help, this forum has been worth gold.

    My question:

    I have a defined range that contains data. Called Lvl_2

    Column A contains a list of data. Column D may or may not contain data (some cells are blank). The data in Column D is populated by a VLOOKUP.

    What I am trying to do is clear the contents of Contents of Column D if the value in the defined Range Lvl_2 is found in Column A.

    I would like to be able to put this in a Module, there for I can recall the Sub when required.

    Thanks for any help in advance.

    Nuffers
    Last edited by Nuffers; 10-22-2012 at 07:23 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Using named range to clear cell data

    if column D is populated via a vlookup, then couldnt you just use/modify/add to that vlookup to show nothing based on your crtaria, instead of using a macro?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    10-17-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Using named range to clear cell data

    An IF OR type statement?

  4. #4
    Registered User
    Join Date
    10-17-2012
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Using named range to clear cell data

    Thanks for that. took a bit of experimenting but this finally worked

    =IF(ISERROR(IF(ISERROR(VLOOKUP(A5,Lvl_2_Inc,2,0)),VLOOKUP(N2,Emp_Type_Desc_Exl,2,FALSE),"YOU IDIOT")),"",IF(ISERROR(VLOOKUP(A5,Lvl_2_Inc,2,0)),VLOOKUP(N2,Emp_Type_Desc_Exl,2,FALSE),"YOU IDIOT"))

    Probably not neat but is working

+ 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