Consulting

Results 1 to 4 of 4

Thread: Formula Trouble

  1. #1

    Formula Trouble

    I have created formulas which I what to copy and paste along a few rows, but when I do the formula changes and I have to manually fix it.

    For Example

    Cell Q7 =SUMIFS(F:F,B:B,"POitem",A:A,"<="&EOMONTH($Q1,0),A:A,">"&EOMONTH($P1,0))

    I want to copy this to cell R7, but when I do it looks like this

    =SUMIFS(G:G,C:C,"POitem",B:B,"<="&EOMONTH($Q1,0),B:B,">"&EOMONTH($P1,0))

    but it should look like
    =SUMIFS(F:F,B:B,"POitem",A:A,"<="&EOMONTH($R1,0),A:A,">"&EOMONTH($Q1,0))

    Why is this happening? How can it be fixed so I don't have to manually enter all the formulas?
    Attached Files Attached Files

  2. #2
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    formula in N7, copied accross to column BT

    [vba]=SUMIFS($F:$F,$B:$B,"POitem",$A:$A,"<="&EOMONTH(N$1,0),$A:$A,">"&EOMONTH(M$ 1,0))[/vba]
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

  3. #3
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Check in Help for Absolute and Relative references.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  4. #4
    thank you both....much help.

Posting Permissions

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