+ Reply to Thread
Results 1 to 6 of 6

Formula to look for number in a column and add cell in same row but different column

  1. #1
    Registered User
    Join Date
    01-02-2018
    Location
    North Dakota
    MS-Off Ver
    2013
    Posts
    21

    Formula to look for number in a column and add cell in same row but different column

    I have a sheet for each month of the year and one of the columns are the dates and just single numbers (1 through 31 obviously) and next to the date column is a price column for our bids corresponding to when that job bid. I want a formula that can look at the date and determine if it was the first week (numbers 1 through 7) and if it matches add up the price corresponding to that job (same row different column). Right now i did that by IF($E$7<=7,$F$7,0)+IF($E$8<=7,$F$8,0)+IF($E$9<=7,$F$9,0)+.... (<=7 because 7 is the end of week 1) and so on but this is tedious and hard to adjust as sometimes there are 30+ jobs in a month. For the second week i have the same thing but instead of IF($E$7<=7,$F$7,0) it's IF($E$7<=14,$F$7,0)+IF($E$8<=14,$F$8,0)+...(<=14 because 14 is the end of week 2) and then at the end i just subtract the first cell so that it takes out anything that was in week 1. Can someone shorten this somehow?
    Attached Files Attached Files
    Last edited by Nelson3494; 01-04-2018 at 01:26 PM.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,748

    Re: Formula to look for number in a column and add cell in same row but different column

    Please upload a small clean sample of your data / workbook (not a picture) to the forum, Make sure you have removed any private information, remember this is a public forum and so available to anyone
    We would like to see an example of your data and also a manual mock up of the expected results you want to achieve.

    To attach a file to your post,
    click "Go advanced" (next to quick post),
    scroll down until you see "manage Attachments",
    click that and select "Choose File" (top Left corner).
    Find your file, click "Open" click "upload" click 'close windows" Top Right. click "Submit Reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    01-02-2018
    Location
    North Dakota
    MS-Off Ver
    2013
    Posts
    21

    Re: Formula to look for number in a column and add cell in same row but different column

    I have posted the workbook. What I'm trying to simplify is in the bottom left on WK1 total and Wk 2 total.
    Last edited by AliGW; 01-04-2018 at 01:28 PM. Reason: Unnecessary quotation removed.

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,748

    Re: Formula to look for number in a column and add cell in same row but different column

    i dont understand the totals
    number of jobs and volume of jobs

    can you put some data into the example - so we can see how you plan to fill in
    and also the results expected

    you maybe able to use countifs or sumifs to do the calculation

    for example the weeks are in E date bid - is that the week range you want to use

    then Sumifs(

    for week 1
    =SUMIFS(F8:F27,E8:E27,"<="&7)
    for week 2
    =SUMIFS(F8:F27,E8:E27,">="&8,E8:E27,"<="&14)

  5. #5
    Registered User
    Join Date
    01-02-2018
    Location
    North Dakota
    MS-Off Ver
    2013
    Posts
    21

    Re: Formula to look for number in a column and add cell in same row but different column

    Quote Originally Posted by etaf View Post
    i dont understand the totals
    number of jobs and volume of jobs

    can you put some data into the example - so we can see how you plan to fill in
    and also the results expected

    you maybe able to use countifs or sumifs to do the calculation

    for example the weeks are in E date bid - is that the week range you want to use

    then Sumifs(

    for week 1
    =SUMIFS(F8:F27,E8:E27,"<="&7)
    for week 2
    =SUMIFS(F8:F27,E8:E27,">="&8,E8:E27,"<="&14)
    Its fine i figured it out all the stuff about jobs i already had i just needed something for the weeks i ended up using =SUMIF(E7:E26, "<8",F7:F26). But anyways it is solved now thank you

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,206

    Re: Formula to look for number in a column and add cell in same row but different column

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Formula to insert number in one column when an item is introduced in another column
    By gko_87 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-07-2017, 05:03 AM
  2. VBA to lookup text in one column then apply formula to number in another column
    By Evan69 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-13-2017, 02:01 AM
  3. Replies: 12
    Last Post: 01-16-2016, 10:13 AM
  4. [SOLVED] If number in Column A matches number in column B - Copy B cell and adjacent cells ?
    By BPSJACK in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-16-2014, 12:30 PM
  5. Formula that advances Column number while being dragged down a single column
    By XlXarchenemyXlX in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-14-2014, 05:25 PM
  6. [SOLVED] need formula to this logic, A column number B column blank then C column desired name
    By vengatvj in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 11-02-2013, 10:30 PM
  7. Replies: 10
    Last Post: 07-12-2010, 08:55 AM

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