+ Reply to Thread
Results 1 to 5 of 5

Copying down a text value written as a number =to range of E

  1. #1
    Registered User
    Join Date
    11-05-2013
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    11

    Copying down a text value written as a number =to range of E

    hey need a little help
    Supplier Customer Vendor Sub Part Number Class
    ACD 2667 002 99 ZD852 W
    ACD 2667 99 ZD123 W
    ACD 2667 99 ZD425 W

    So heres the deal. i need to copy down column 3 the "002" which is a text format to column 5's last cell. so in this example the next 2 spaces... i do these on a large scale this is just a trial.

    So basically C2's value has to copy down to the last row of value in E .

    i cannot put together anything, it being a text value is screwing up all my macros that i have tried to write and i cant seem to get anything to work other than doing it manually.. but that interrupts other macros im running. Anyone have an idea, i think i am over thinking a simple task to be honest.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: Copying down a text value written as a number =to range of E

    Hi and welcome to the forum

    You did not specify if you wanted the 002 to increase with each row?

    Assuming that's what you meant, try this, copied down...
    =IF(E2="","",TEXT(C2*1+1,"000"))

    If you just want 002 to appear in every row, then just use this...
    =IF(E2="","",C2)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    11-05-2013
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Copying down a text value written as a number =to range of E

    Fdibbins unless i am not applying it correctly thats not going to work.. this is the code i am using now to fill C down to where ever E ends in row ex: 48965

    and yes i need 002 to apply in every row . but 002 is going to be different in every new excel file i open. so thats when i need a macro to take my value in c2 and copy it down in every row to the last value of E

    this is what i am using now

    Range("C3:C65536") = ""
    Range("C2").AutoFill Destination:=Range("C2:C" & Range("E65536").End(xlUp).Row), Type:=xlFillDefault

    sorry how do i post code correct in threads

    and this code works.. BUT it increases with each row.. 002,003,004.. etc you know
    any way is am tweak this to make it do what i want?
    and thanks for the welcome!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: Copying down a text value written as a number =to range of E

    From the sounds of it, 002 is actually just 2, formatted yto look like 002. If thats the case, then when you copy it down, excel will increase the value by 1, by default, so maybe you need to change the 2 to '002 when you enter it?

  5. #5
    Registered User
    Join Date
    11-05-2013
    Location
    new york
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Copying down a text value written as a number =to range of E

    numerically yes it is just 2, but in my excel file that that column represents vendors and each vendor is assigned a 3 digit number and the computer reads all 3. so my system will error out if it sees 2, it needs to see 002.

    and i do change the 2 to 002. i change the format to text (otherwise 002 isnt possible to view) and once 002 and i run my macro it still goes 002,003,004. right now i dont have many vendors that have zeros in the front of them, so i have been running everything and just manually going back into the file to adjust it. just thought i might find a new way. oh well lol .

    thanks for your help FDibbins it is much appreciated.

+ 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. Copying a range a number of times.
    By Paxman71 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2013, 02:02 PM
  2. [SOLVED] Formula to count the number of spaces before text/number is written in a cell.
    By kmis in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-12-2013, 05:05 PM
  3. Is this the same range written two different ways?
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-20-2011, 05:52 PM
  4. How to express a number in the corresponding value written in words
    By Romoluzzi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-21-2010, 06:45 AM
  5. [SOLVED] Is there a formula to change number value to the written value?
    By Ginny@apl in forum Excel General
    Replies: 3
    Last Post: 02-22-2006, 10:45 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