+ Reply to Thread
Results 1 to 4 of 4

formula to insert code and description automatically from another database based on ref

  1. #1
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    formula to insert code and description automatically from another database based on ref

    Hi All
    I looking for a formula to insert data in header field REF and description of goods _1 header IN SAMPLE SHEET automatically based on REF header of sample database sheet where H code header and DESCRIPTION header data are found.

    Annexed sample what i am expecting

    For moment i use autofilter and find but very tedious .

    Can anyone help.

    Thanks in advance
    Attached Files Attached Files

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

    Re: formula to insert code and description automatically from another database based on r

    It would have to be an array formula, and I hate those.
    So I wrote a sub.
    just click the button.
    This is a macro enabled workbook, so you will have to enable macros when you open it.

    this is the code anyway, just a double loop.
    Please Login or Register  to view this content.
    The other column s in the sample workbook is just a formula to count how many matches there really where.
    You will see there are only 18 matches.
    Attached Files Attached Files
    Last edited by davesexcel; 11-18-2014 at 02:03 AM.

  3. #3
    Registered User
    Join Date
    12-28-2011
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: formula to insert code and description automatically from another database based on r

    Use iferror + vlookup formula in sample sheet

    Hcode column (a2) formula - =IFERROR(VLOOKUP(C2,'Sample Data base '!$A$1:$D$1189,3,0),"")
    Description of Good column (b2) formula - =IFERROR(VLOOKUP(C2,'Sample Data base '!$A$1:$D$1189,4,0),"")

    Attached spreadsheet too...
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    Re: formula to insert code and description automatically from another database based on r

    Hi Plan

    I tried to drag formula but obtain #name

    See attached could you help me

    Thanks
    Attached Images Attached Images
    Attached Files Attached Files

+ 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. Replies: 2
    Last Post: 07-22-2014, 07:44 AM
  2. VBA Excel Code to Insert New Record into MS Access Database
    By Vladamir in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-28-2012, 09:15 AM
  3. Replies: 1
    Last Post: 05-03-2009, 07:52 AM
  4. Insert columns based on tab description
    By lockye in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2009, 10:48 AM
  5. [SOLVED] enter item code in one column, automatically get description in ne
    By Shelley Kingston in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-19-2006, 07:35 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