+ Reply to Thread
Results 1 to 2 of 2

Macro convert text to number & copy criteria from another sheet

  1. #1
    Registered User
    Join Date
    01-21-2018
    Location
    Chicago, Illinois-*88888888888888888888
    MS-Off Ver
    2013
    Posts
    4

    Macro convert text to number & copy criteria from another sheet

    Greetings All,

    I am new to vba and have searched this forum to find my answer but have no idea what I'm doing.
    Would anyone know how add a vba to this existing macro so I wont have to do a vlookup after running the macro.
    1. Remove dashes and spaces from spreadsheet 1(detail) in column A:A
    2. Convert stored text to numbers
    3. Searches criteria in ASM File for value from Detail sheet column A
    4. Pastes Entire Row into Macro Data Sheet
    5. Then the results found in "macro data" sheet, copy rows from column BG & BH and paste in to the Detail Sheet column B & C.

    This macro searches a value in "Detail" sheet in the "ASM file" and copies the entire row then pastes in a different sheet named "Macro Data." I use this macro on a large data CSV file with over 100,000 line items and then do a vlookup in the macro data file to pull matching cell data from column BH & BG. I use this vlookup formula =VLOOKUP($A2,'Macro Data'!$A:$BH,59,FALSE) and =VLOOKUP($A2,'Macro Data'!$A:$BH,60,FALSE)

    Typically before running the macro I format my cells to remove dashes and convert to number then run this existing macro on a CSV file where the macro copies the entire row into the macro data tab. I also do a vlookup to find the results in the Macro Data sheet for columns BG &BH which are columns 59 and 60, I like to skip these steps. Any help to creating a macro that eliminates the vlookup step for me.



    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by nicebeaches; 02-21-2018 at 10:21 PM.

  2. #2
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Macro convert text to number & copy criteria from another sheet

    Hi nb - as discussed in your previous thread, please edit your post to include code tags.
    Just select the relevant macro text and click the # icon on the editing toolbar.
    Clicking the Add Reputation star below helpful posts is a great way to show your appreciation.
    Please mark your threads as SOLVED upon conclusion (Thread Tools above Post # 1). - Lee

+ 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] Macro to convert text number to digital number
    By Patish in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-18-2014, 07:43 AM
  2. need to convert details in entire sheet from text to number format
    By aleanboy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-25-2014, 02:42 PM
  3. [SOLVED] VBA Macro to convert text to number
    By Pho6 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-13-2013, 02:04 AM
  4. Macro to convert text to number
    By Wgmoneill in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-20-2012, 02:12 PM
  5. Macro to convert a mutiple sheet workbook to tab delimited text or fixed width text file
    By chandra 2185 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-05-2012, 10:29 AM
  6. [SOLVED] Make Excel count a text value and convert it to a number in another sheet
    By maximelling in forum Excel General
    Replies: 3
    Last Post: 05-02-2012, 05:42 AM
  7. Convert a number formatted as text to a number in a macro
    By MACRE0 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-21-2005, 09:51 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