Consulting

Results 1 to 2 of 2

Thread: Help vba code for a formula in two cells

  1. #1
    VBAX Regular
    Joined
    Dec 2015
    Posts
    11
    Location

    Help vba code for a formula in two cells

    Hi Friends,

    I have a sheet where I need a formula(as below) to be inserted in the in column "B" and "C" using a vba code.

    Column B = NETWORKDAYS(A2,$D$2)-1
    Column C = =IF(B2>90,">90 Days",(IF(B2<6,"0-5 Days",IF(B2<31,"6-30 Days",IF(B2<91,"31-90 Days")))))

    Attached sheet for your reference.

    Capture.JPG

    Data in column A and D will change every month.

    Request your help on this.
    Attached Files Attached Files

  2. #2
    Moderator VBAX Wizard SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,273
    Location
    Range.Formula = Complete Formula in Quotes
    Range("A1").Formula = "=Sum(B1,B2)"
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •