Results 1 to 7 of 7

Automatically changing cell numbers into names

Threaded View

  1. #1
    Registered User
    Join Date
    02-16-2022
    Location
    Belgium
    MS-Off Ver
    latest
    Posts
    9

    Automatically changing cell numbers into names

    I am looking for some help on making a bit of code as I don't know how to do it.

    I have cells for these variables: (so they can be easily edited)
    ID1: 04e42adab35780 (used for Person1: customer)
    ID2: 04944d8a126885 (used for Person2: chief)
    ...

    The code needed would change the ID's from all the data into the persons name (the ones from above) once I click a button


    I already have this code to import data from a different file:
    Sub RFID_Omzetter() ' ' RFID_Omzetter Macro ' RFID cijfers omzetten naar namen ' ' Sneltoets: Ctrl+d ' ' gegevens kopiëren van een werkblad naar werkblad RFID Omzetter vanaf cel A10 Dim wsCopy As Worksheet Dim wsDest As Worksheet Dim lCopyLastRow As Long Dim lDestLastRow As Long Dim ImporteerNaam As String Dim Badge1 As String, badge2 As String ImporteerNaam = [B3].Value Badge1 = [B5].Value badge2 = [B6].Value '0. Open workbook Workbooks.Open "C:\Users\stagiair\Documents\" & ImporteerNaam & "" Set wsCopy = Workbooks(ImporteerNaam).Worksheets(1) 'The last 1 means the first page of the worksheet Set wsDest = Workbooks("RFID omzetter.xlsm").Worksheets("RFID Omzetter") '1. Find last used row in the copy range based on data in column A lCopyLastRow = wsCopy.Cells(wsCopy.Rows.Count, "A").End(xlUp).Row '2. Find first blank row in the destination range based on data in column A 'Offset property moves down 1 row lDestLastRow = wsDest.Cells(wsDest.Rows.Count, "A").End(xlUp).Offset(1).Row '3. Clear contents of existing data range wsDest.Range("A10:G" & lDestLastRow).ClearContents '4. Copy & Paste Data wsCopy.Range("A1:G" & lCopyLastRow).Copy _ wsDest.Range("A10") '5. Close workbook Workbooks(ImporteerNaam).Close SaveChanges:=True End Sub
    Attached Files Attached Files
    Last edited by IGDT; 02-24-2022 at 09:42 AM. Reason: solved the problem

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Changing names based on another table automatically
    By amirmir in forum Excel General
    Replies: 9
    Last Post: 02-07-2020, 12:39 PM
  2. How to prevent excel from changing UDF names automatically
    By kotnig in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2018, 03:53 PM
  3. Changing names to User ID numbers
    By stoudty in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-12-2012, 08:00 AM
  4. Vlookup, Changing names to numbers, and other fun Excel adventures
    By jasbentle in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-05-2012, 08:46 PM
  5. Automatically Changing Numbers to Date
    By Intoxicated-T-F in forum Excel General
    Replies: 4
    Last Post: 12-07-2007, 05:47 PM
  6. Excel Changing Numbers Automatically
    By TomJerzey in forum Excel General
    Replies: 4
    Last Post: 09-19-2005, 10:05 AM
  7. [SOLVED] How do I automatically calculate YTD numbers by changing a date?
    By MDSistah in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-29-2005, 01:06 PM

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