+ Reply to Thread
Results 1 to 2 of 2

Find text in a cell and fill columns with specific numbers if match is found using VBA

  1. #1
    Registered User
    Join Date
    09-10-2013
    Location
    Clearwater, FL
    MS-Off Ver
    Excel 2007
    Posts
    1

    Find text in a cell and fill columns with specific numbers if match is found using VBA

    So every week I have a dump of invoices that go into an excel spreadsheet. What I need to do is have it search the Item Desc based on two critera "cd" and "1" and if a match is found copy the "Quantity" and "Amount" to certain columns and then fill the columns that have "Specific #" with a specific number.


    A B C D E F G H I J K L M N O P Q R S T U V W X Y Z AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ AR
    Ignore Ignore Ignore Ignore Ignore Item Desc Quantity Amount $AV Specific # 1 Specific # 2 Specific # 3 #B #P #CD # DVD # cass # m $ CD $DVD $ cass $ m Cat #1 Cat #2 Cat #3 Cat #4 Cat #5 Cat #6 Cat #7 Cat #8 Cat #9 Cat #10 Cat #11 Cat #12 Cat #13 Cat #14 Cat #15 Cat #16 Specific # 4 Specific # 5 Ignore Specific # 6 Specific # 7 Specific # 8
    cd 1 1 20 20 1 0 1 1 20 20 $20 0 0 0 0 0
    cd 2 1 15 15 1 0 1 1 15 15 $15 0 0 0 0 0
    P 1 3 30 3 3 0 3 30 $30 0 0 0 0 0
    cd 47 1 100 100 12 2 10 1 100 100 100 100 0 0 0 0 0
    HC book #1 1 20 1 1 0 1 20 20 20 20 0 0 0 0 0

    What I want to do is make a database of these item searches to cover hundreds of different items, so it will fill in the entire spreadsheet with the correct data specified for each item.

    So something that would do this:
    Please Login or Register  to view this content.
    I just need the real code that would actually do this in VBA.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: Find text in a cell and fill columns with specific numbers if match is found using VBA

    Welcome to the forum.
    We only help on certain problems not to create a worksheet for you..
    You should start first then if you encounter a problem on the worksheet it's the the time to ask a question to fellow members.
    Thanks.

    Commercial Service Link
    Ben Van Johnson

+ 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] If specific text is found in cell, then return a number
    By csch123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-31-2013, 05:07 PM
  2. [SOLVED] Find cell with specific text in a row, then rearrange the columns
    By cyin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-17-2012, 11:10 AM
  3. fastest way to find the row where a specific text is found in a specific column
    By getgray in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-23-2011, 02:45 PM
  4. Replies: 0
    Last Post: 05-22-2006, 03:45 PM
  5. Replies: 1
    Last Post: 11-10-2005, 09:10 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