+ Reply to Thread
Results 1 to 2 of 2

Need help with If statements loop through entire work book rows pasting values

  1. #1
    Forum Contributor
    Join Date
    09-23-2015
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    187

    Need help with If statements loop through entire work book rows pasting values

    Hi All,

    I need a code that will run through each row in the workbook, and for column E i would like the row to equal this...
    If there is a value in column D for that row, paste it in column E.... Else If, go check column C for a value and paste it in column E.... Else If, (both contain no value) put the string "N/A"

    How would I write a code for this Sample.xlsm

    Anything would help, cheers

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Need help with If statements loop through entire work book rows pasting values

    Put this formula in cell E2 and copy it down the column: =IF(AND(D2="",C2<>""),C2,IF(AND(D2<>"",C2=""),D2,"NA"))
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

+ 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. Copy/Pasting a Sheet multiple times in the same work book
    By Morallach in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-21-2014, 10:11 PM
  2. [SOLVED] Copy/Pasting an excel sheet with the same formatting/formulas in the same work book to x
    By Morallach in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-20-2014, 02:57 AM
  3. Moving an entire row from one work book to another based on conditional formatting
    By emilyloz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-11-2013, 10:30 AM
  4. Replies: 0
    Last Post: 06-11-2013, 08:22 AM
  5. Reference an entire worksheet within a work book?
    By sgillispie in forum Excel General
    Replies: 5
    Last Post: 03-09-2012, 01:14 PM
  6. Assign List to Entire Work Book
    By rajeshp1983 in forum Excel General
    Replies: 1
    Last Post: 02-11-2011, 02:04 AM
  7. Page Breaks for Entire Work Book
    By Steve in forum Excel General
    Replies: 2
    Last Post: 07-12-2005, 07:05 PM

Tags for this Thread

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