Returning a value in a column offset from its criteria

JACOBB9900

New Member
Joined
Apr 8, 2019
Messages
38
Hello I need help summing data in a column if the range of columns falls on a certain day. See below for an example of my Gantt spreadsheet. It is divided into 8 hour days. The jobs are on the left side "Y" axis and their progress is depicted in each row. To the right of the job are the operations each job needs to process through, (i.e. ADC,IR,ABS,MSK,CR,HT) and below each operation is the total time it takes to process. I need to sum the time it takes to process each operation within that hour. As you can see I summed it all manually in the table above the Gantt chart to show how I need it. As always I appreciate all the help. Please let me know if there are any questions. Figuring this out would definitely cut back a lot of time. Thank you.
GANTT HELP.PNG
 
Jacob,
That's good to hear...thanks for the feedback. As for the other idea, you might consider something like this. It involves changing only the references to the original column of data...essentially
B$15:B$22 is replaced with OFFSET(B$15:B$22,0,8*($T$2-$T$1)) and that messier formula is recopied throughout your two summary tables for C/T and M/H.
The formula simply shifts the reference column by some multiple of 8, and that multiple is given by ($T$2-$T$1), the difference in days between the baseline date associated with cell B15 (and reentered in cell $T$1) and the target date that you enter in cell $T$2. This works assuming your scheduling chart holds sequential days, each day with 8 columns, and no skips (meaning every calendar day occupies 8 columns, even if blank as might be the case on weekends or holidays). If that is not the case, an alternative approach might be to use INDEX/MATCH to find the target date in a row, and then use that cell reference in conjunction with OFFSET to reference the appropriate ranges.

MrExcel_2.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZ
13/5/2020<-- date associated with indexing date
23/6/2020<-- date to summarize
3C/T HOURSM/H HOURS
4HRS1234567812345678
5ADC0.200.000.000.000.000.000.000.002.000.000.000.000.000.000.000.00
6IR0.100.300.500.200.400.100.300.201.003.005.002.004.001.003.002.00
7ABS#0.000.600.000.900.000.900.300.000.001.000.001.500.001.500.500.00
8MCH#0.210.210.070.140.070.280.210.281.501.500.501.000.502.001.502.00
9CR0.000.000.000.300.000.000.000.000.000.000.000.500.000.000.000.00
10WLD*0.400.000.400.000.400.000.200.201.000.001.000.001.000.000.500.50
11OUT0.000.000.000.000.100.000.000.000.000.000.000.001.000.000.000.00
12
13Thursday, March 5 2020Friday, March 6 2020Saturday, March 7 2020
14Jobs123456781234567812345678
15JOB 1IR C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1ADC C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1ADC C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1.3
16JOB 2MCH# C/T0.07 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1MCH# C/T0.07 O/P30 M/H0.5CR C/T0.32 O/P20 M/H2.1MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1MCH# C/T0.07 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1MCH# C/T0.07 O/P30 M/H0.5
17JOB 3WLD* C/T0.2 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5ABS# C/T0.3 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5ABS# C/T0.3 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5
18JOB 4MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5OUT C/T0.1 O/P20 M/H1WLD* C/T0.2 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5MCH# C/T0.09 O/P30 M/H0.5
19JOB 5ADC C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1ADC C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1CR C/T0.3 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1MCH# C/T0.07 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1CR C/T0.3 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1
20JOB 6IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1MCH# C/T0.07 O/P30 M/H0.5OUT C/T0.1 O/P20 M/H1MCH# C/T0.07 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1MCH# C/T0.07 O/P30 M/H0.5OUT C/T0.1 O/P20 M/H1MCH# C/T0.07 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1ABS C/T0.1 O/P20 M/H1ADC C/T0.15 O/P20 M/H1MCH# C/T0.07 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1ABS C/T0.1 O/P20 M/H1
21JOB 7MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5ABS# C/T0.3 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5ABS# C/T0.3 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1WLD* C/T0.2 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5ABS# C/T0.3 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5OUT C/T0.1 O/P20 M/H1MCH# C/T0.07 O/P30 M/H0.5
22JOB 8WLD* C/T0.2 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5IR C/T0.1 O/P20 M/H1IR C/T0.1 O/P20 M/H1ABS# C/T0.3 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5MCH# C/T0.07 O/P30 M/H0.5WLD* C/T0.2 O/P30 M/H0.5
Sheet8 (3)
Cell Formulas
RangeFormula
C5:J11C5=SUMPRODUCT(--(LEFT(OFFSET(B$15:B$22,0,8*($T$2-$T$1)),LEN($B5))=$B5),NUMBERVALUE(MID(OFFSET(B$15:B$22,0,8*($T$2-$T$1)),SEARCH("C/T",OFFSET(B$15:B$22,0,8*($T$2-$T$1)))+3,SEARCH("O/P",OFFSET(B$15:B$22,0,8*($T$2-$T$1)))-SEARCH("C/T",OFFSET(B$15:B$22,0,8*($T$2-$T$1)))-4)))
L5:S11L5=SUMPRODUCT(--(LEFT(OFFSET(B$15:B$22,0,8*($T$2-$T$1)),LEN($B5))=$B5),NUMBERVALUE(MID(OFFSET(B$15:B$22,0,8*($T$2-$T$1)),SEARCH("M/H",OFFSET(B$15:B$22,0,8*($T$2-$T$1)))+3,LEN(OFFSET(B$15:B$22,0,8*($T$2-$T$1)))-(SEARCH("M/H",OFFSET(B$15:B$22,0,8*($T$2-$T$1)))+2))))
 
Upvote 0

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,214,911
Messages
6,122,192
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top