+ Reply to Thread
Results 1 to 4 of 4

VBA macro to check if one cell has text and paste a formula in a different cell

  1. #1
    Forum Contributor
    Join Date
    11-14-2012
    Location
    Kentucky
    MS-Off Ver
    Office 16
    Posts
    112

    VBA macro to check if one cell has text and paste a formula in a different cell

    Basically I need a code to look in B8 for text and if there is text I need the code to place a formula in the corresponding "D" column.

    so for instance if B8 says adam then i need a code to paste =VLOOKUP(B8,Sheet1!A:B,2,FALSE) and so on for the entire column B and D??

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: VBA macro to check if one cell has text and paste a formula in a different cell

    Give this a try:

    Please Login or Register  to view this content.
    Gary's Student

  3. #3
    Forum Contributor
    Join Date
    11-14-2012
    Location
    Kentucky
    MS-Off Ver
    Office 16
    Posts
    112

    Re: VBA macro to check if one cell has text and paste a formula in a different cell

    Thank you so much worked perfectly

  4. #4
    Forum Contributor
    Join Date
    11-14-2012
    Location
    Kentucky
    MS-Off Ver
    Office 16
    Posts
    112

    Re: VBA macro to check if one cell has text and paste a formula in a different cell

    That worked perfectly however I tried to use the same code with this formula and i get a error

    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