Results 1 to 6 of 6

Thread: Macro for if cell A2 has text then cell B2 must have numeric value.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Hi Albert,

    Welcome to ExcelFox!!

    What you are asking can be achievable by tweaking the b2 formula.

    in b2

    =if(len(a2),iferror(yourvlookupformula,"Not found"),"")

    it checks a2 and if a2 has value in it, performs vlookup and if it doesn't find a value to return, gives "not found" otherwise returns the found value. Now if a2 remains blank, b2 will also remain blank.
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  2. #2
    Junior Member
    Join Date
    Mar 2013
    Posts
    6
    Rep Power
    0
    vlookup formula is not in B2, only in other fields such as units and prices and vat.

    B column is purely quantity and it can be 1 or 5.
    Last edited by Admin; 03-08-2013 at 12:17 PM. Reason: removed quote

Similar Threads

  1. Replies: 2
    Last Post: 05-30-2013, 07:28 PM
  2. Replies: 8
    Last Post: 04-29-2013, 08:36 PM
  3. Storing Text Value From Cell To Array
    By marreco in forum Excel Help
    Replies: 2
    Last Post: 02-15-2013, 01:11 AM
  4. Last Filled Cell Having Text
    By Excel Fox in forum Excel and VBA Tips and Tricks
    Replies: 5
    Last Post: 07-18-2011, 02:33 PM
  5. Excel Macro Functions (GET.CELL)
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 1
    Last Post: 05-17-2011, 08:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •