Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Peskarik

    Question from a rookie

    John, thanks again. I write down all suggested code snippets and take it apart using VBE help files. Now, you misunderstood me a little. I have two sheets, the "main" sheet does not matter to me, it could be empty or full of stuff. On the "Shading" sheet, on the other hand, I have numbers 1:25...
  2. Peskarik

    Question from a rookie

    Thanks, Skip. I thought the problem was ActiveCell, that is, when I am in "main" sheet, active cell is in that sheet rather than in "Shading", and that was the cause of the problem. Sergo
  3. Peskarik

    Question from a rookie

    Thanks, John, but the question is not so much whether VBA is required, but rather why the code does not work in this particular case. I am trying to understand how VBA functions. Sergo
  4. Peskarik

    Question from a rookie

    Hello, THough I have been registered here for a year, I've never really used VBA, until 2 days ago. Decided to learn a little. background and question: I have an open workbook with 2 worksheets: "Shading" and "main". I want to shade every second row in Shading as long as there are values in the...
  5. Peskarik

    Novice problem with If...Then statement

    John, thanks! Now I understand! Zack, not non-contiguous, no. I ment the following: the way the function is written now, for it to return the correct value (that is - expected value, not -1), I have to input FIRST vector of values and THEN vector of probabilities. So it is, so to speak...
  6. Peskarik

    Novice problem with If...Then statement

    Hi, Zack This is a basic Expected Value calculation function. I call it from an Excel spreadsheet writing =ExpVal(A1:A5; B1:B5), for example. So there are 2 arrays of numerical data in that same spreadsheet - a vector of probabilities in B1:B5, (probabilities sum to 1), and a vector of values...
  7. Peskarik

    Novice problem with If...Then statement

    Hello, guys This is my first post. Moreover, I am novice at VBA. I got a couple of questions. I have this code for expected value calculation: [COLOR=blue] Function ExpVal(vvec, pvec) ' returns expected value for 2 arrays If Application.Sum(pvec) <> 1 Or _ Application.Count(vvec) <>...

Part and Inventory Search

Back
Top