Consulting

Results 1 to 4 of 4

Thread: Sum adjacent columns based on criteria

  1. #1
    VBAX Newbie
    Joined
    May 2018
    Posts
    2
    Location

    Sum adjacent columns based on criteria

    Good morning all,

    I'm new to the forum and a novice when it comes to VBA.

    I'm currently tasked with calculating the thickness of material [anything containing RBL (rubble)] in a samples, however the calculation should terminate when the first SST or CNG (sandstone or conglomerate) is encountered. The forumula will the have to loop down the worksheet. An example is attached as a jpeg.

    I have ten of thousands of rows to calculate.

    Any advice or assistance will be greatly appreciated.
    Thanks,
    Andy
    Attached Images Attached Images

  2. #2
    Hi,

    Cause you attach a picture and we don't know location of cells in need...
    Use SUMIF..

  3. #3
    VBAX Newbie
    Joined
    May 2018
    Posts
    2
    Location
    Hi Tom,

    Thanks for your reply. Rather silly of me to attached a picture. Please find attached a xmls example.

    I will give SUMIF a go.

    Cheers,
    Attached Files Attached Files

  4. #4
    In H13 use:

    =SUMIF(G2:G11,"RBL",H2:H11) for Unit_3 and m3

Posting Permissions

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