+ Reply to Thread
Results 1 to 4 of 4

Looking to replace contents of a cell with a formula

  1. #1
    Forum Contributor
    Join Date
    09-12-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    127

    Looking to replace contents of a cell with a formula

    I am looking to replace the contents of selected cells in column E with a formula with in a macro. For each cell in column E sheet1 that equals "Not Assigned" I want the macro to replace it with the following formula =iferror(vlookup(cell.offset(, -4),'sheet2'A:C,3,false),"Not Assigned"). The file typically has 25k-30k rows, cell.offset(, -4) needs to be dynamic so the formula is looking a the cell in column A of the row that it finds a "Not Assigned" in column E.

    thanks, s4

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Looking to replace contents of a cell with a formula

    You could do a straight Edit-Replace (CTRL-H) ??
    Elegant Simplicity............. Not Always

  3. #3
    Forum Contributor
    Join Date
    09-12-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    127

    Re: Looking to replace contents of a cell with a formula

    I'm lookin g to do it within the macro. The formula has to to be slightly different in each row. Row 10 will be =iferror(vlookup(A10,... Row 2000 would be =iferror(vlookup(A2000,... etc. After the macro is ran the user will fill in column C on sheet2 (which is the return value for the formula on sheet1).

  4. #4
    Forum Contributor
    Join Date
    09-12-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    127

    Re: Looking to replace contents of a cell with a formula

    I figured it out.

    this is the code that I was looking for earlier.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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