Results 1 to 6 of 6

If Cell equals text Copy Cells, B2,B3,B4

Threaded View

  1. #1
    Registered User
    Join Date
    06-17-2005
    Posts
    13

    If Cell equals text Copy Cells, B2,B3,B4

    How can I detect a cell value in VBA if the cell is text? I want to set an if statement based on the whether or not cell B7 equals USA.

    So if cell B7 = "USA" then copy paste B4, B5, B6 to A1, C1, D1,

    If B7<> "USA" then copy paste B4, B5, B6, B7 to A1, B1, C1, D1.

    I'm new to programming but have made macros using macro record as well as modifying some of the macros from examples on the internet. I can’t seem to find the appropriate functions in VBA help or figure ot enough from the examples on the site to accomplish what I want. Just a point in the right direction would be greatly appreciated.

    :: Description of what I'm trying to do ::
    I have numerous invoices imported from .csv files in excel documents. I would like to take the billing name shipping name etc and put them all on one row. Unfortunately since the invoice is saved from a webpage the Address 2 Field is dynamic I need to detect what kind of invoice it is to copy the fields. All of our invoices have USA after the city, ST, Zip cell. So by determining which cell USA is in I can copy paste the appropriate cells into my row.

    Thanks for any help or guidance.

    Scott
    Last edited by Djmask; 08-20-2005 at 12:53 AM. Reason: Made a mistake

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