LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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 1A, 2B, 4B,

If B7< "USA" then copy paste B4, B5, B6, B7 to 1A, 2B, 3B, 4B.

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


--
Djmask
------------------------------------------------------------------------
Djmask's Profile: http://www.excelforum.com/member.php...o&userid=24414
View this thread: http://www.excelforum.com/showthread...hreadid=397433

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel cell value equals selected text from Word sarahphonics Excel Discussion (Misc queries) 0 April 19th 10 04:15 PM
If a cell equals _, at the next row that equals _, return value fr CathyH Excel Worksheet Functions 10 May 2nd 07 07:53 PM
If cell is left blank, or equals zero, then cell equals a different cell John McMurry Excel Discussion (Misc queries) 3 April 13th 07 01:14 PM
How to I copy text from a range of cells to another single cell? WRT Excel Discussion (Misc queries) 2 December 18th 05 06:17 AM
Entered text value equals a number I specify in another cell Dave S. Excel Worksheet Functions 3 June 12th 05 10:07 PM


All times are GMT +1. The time now is 06:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"