Results 1 to 5 of 5

VBA Code word for text string comparison...

Threaded View

  1. #1
    Registered User
    Join Date
    09-16-2009
    Location
    Houston
    MS-Off Ver
    Excel 2007
    Posts
    37

    Talking VBA Code word for text string comparison...

    Hey!

    I would like to know what code word should I use thato allow the program to read and compare text strings within VBA.

    for instance I have three columns

    A | B | C

    In column A, I will type the name of a thing (i.e. apples and pears)
    In column B I will type the amount of apples or pears that I ate on day 1
    In column C, I will type the amount of apples our pears that I ate on day 2

    Therefore the code should have the following format
    if(Range "A3:A10"="APPLE)
    THEN 
     =sum(B3:C3)
    END IF
    IF(RANGE"A3:A10" = "PEAR") 
    THEN 
    =sum(B3:C3)
    
    ENDIF
    Let me know... Thanks!
    Last edited by Leith Ross; 09-29-2009 at 04:54 PM. Reason: Added Code tags

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