+ Reply to Thread
Results 1 to 2 of 2

automatic formula change in VBA

  1. #1
    Registered User
    Join Date
    05-13-2010
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2003
    Posts
    1

    automatic formula change in VBA

    Hello,

    I am new to VBA so i'm not to sure of how this works, but what i need to do find a way to get my formulas done automatically because i have a big database.

    The formula i have developed is this:
    =SUMPRODUCT((Sheet2!A1:A67=3338)*(Sheet2!F1:F67={"Andre Lalande","Francis Wolfe","Claude Dugas","Pierre De Lafontaine"})*(Sheet2!G1:G67))

    but i need the names to change according to a specific cell (eg. if C4=avionics, then the name list will be "Pat","Phil","Rick", but if C4=pneumatics, then the name list is....)

    also this part must change: Sheet2!A1:A67=3338, where the number 3338 must vary according to a cell containing its exact name (eg. if B4=4567 the i want Sheet2!A1:A67=4567)

    Is this possible to do?

    Thx for your help

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: automatic formula change in VBA

    can you post a smale sample workbook to play with?
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

+ 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