+ Reply to Thread
Results 1 to 2 of 2

VBA Code to Find Row Number and Copy it to Adjacent Cell

Hybrid View

theteerex VBA Code to Find Row Number... 03-30-2018, 10:47 AM
Mumps1 Re: VBA Code to Find Row... 03-30-2018, 12:50 PM
  1. #1
    Registered User
    Join Date
    03-30-2018
    Location
    Chicago, USA
    MS-Off Ver
    2016
    Posts
    1

    VBA Code to Find Row Number and Copy it to Adjacent Cell

    With two sheets, a Feeder sheet and a Database, I have two columns of data I would like matched.
    On the Feeder, all data is in rows:
    VALUE 1 -Location Time Cost Duration
    VALUE 2 -Location Time Cost Duration
    VALUE 3 -Location Time Cost Duration
    VALUE 4 -Location Time Cost Duration
    With all Values in column B.

    On Database, all data is in columns:
    VALUE 1 Location
    VALUE 1 Time
    VALUE 1 Cost
    VALUE 1 Duration
    VALUE 2 Location
    VALUE 2 Time
    VALUE 2 Cost
    VALUE 2 Duration
    VALUE 3 Location
    VALUE 3 Time
    VALUE 3 Cost
    VALUE 3 Duration

    With all values in column C.

    So I can run pivot table.

    I would like my code to find the first instance of each value(a text string) in the Database and copy the row number in the adjacent cell on the Feeder sheet.
    So my data would end up looking like this on the Feeder sheet:
    2 VALUE 1 -Location Time Cost Duration
    6 VALUE 2 -Location Time Cost Duration
    10 VALUE 3 -Location Time Cost Duration
    14 VALUE 4 -Location Time Cost Duration

    This way, a user can always see that their records have been correctly created in the Database without having to run a search. It also serves as an error checker.
    I would like this to run automatically.
    Any suggestions?

    Thanks in advance!

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,026

    Re: VBA Code to Find Row Number and Copy it to Adjacent Cell

    Cross posted at: https://www.mrexcel.com/forum/excel-...cent-cell.html

    Welcome to the Forum. Please check Forum rules which state that if you must post in more than one Forum, you should include a link to the other post.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

+ 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. Find then Replace Adjacent Cell with New Number
    By n0mad in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 01-28-2017, 08:44 PM
  2. [SOLVED] Help with VBA Code - Find cells with specific value, Copy/Paste value from adjacent colmns
    By Mikeyc85 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-09-2015, 12:32 PM
  3. Find a number and replace the adjacent cell with other number
    By shafath03 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2013, 09:09 PM
  4. copy a specif cell value, find another like that in sheet copy adjacent cell and pate
    By smwaqas89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-16-2013, 10:00 AM
  5. Find data and copy adjacent cell
    By hockeyadc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-10-2012, 02:35 PM
  6. Replies: 1
    Last Post: 01-18-2008, 07:01 PM
  7. Find Cell and Copy adjacent value to another location
    By JJalomo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-08-2005, 04:06 PM

Tags for this Thread

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