Create a table based on value from 4 columns

Rsantiago125

New Member
Joined
Mar 19, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hi,

Needs some help. I'm trying to make a table based on data that was collected. For example if cell B3, D3, E3 has a specific data, then input the value in cell G3 to a table.

For Example. These are the data that I collected. I need to fill in the value from G3 to a table.
1647729684858.png




This is the table that I need to create. If the criteria in B3, C3, D3, E2 matches from the data based, then add the "Action Value (G3 from the data)" to E3.

1647729713025.png



It should look like this in the end:

1647729739765.png



Thanks in advance.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
I forgot to mention. More data will get added. The main purpose of the table is to track the progress. Anything that doesnt have a value "1" means the test are pending.
 
Upvote 0
Hi,

Needs some help. I'm trying to make a table based on data that was collected. For example if cell B3, D3, E3 has a specific data, then input the value in cell G3 to a table.

For Example. These are the data that I collected. I need to fill in the value from G3 to a table.
View attachment 60481



This is the table that I need to create. If the criteria in B3, C3, D3, E2 matches from the data based, then add the "Action Value (G3 from the data)" to E3.

View attachment 60482


It should look like this in the end:

View attachment 60483


Thanks in advance.

Heres the database i XLM form:

Book1
BCDEFG
2ProductMonthVoltagesRead TimeTestAction
3Device_AJan600mV0test11
4Device_AJan700mV0test21
5Device_AFeb800mV0test31
6Device_AFeb900mV0test11
7Device_AMar1000mV11test21
8Device_AMar1100mV11test31
9Device_BJan600mV11test11
10Device_BJan700mV11test21
11Device_BFeb800mV11test31
12Device_BFeb900mV0test11
13Device_BMar1000mV0test21
14Device_BMar1100mV0test31
15Device_CJan600mV11test11
16Device_CMar800mV11test31
17Device_CJan1000mV11test21
18Device_CMar1100mV11test31
Sheet1



I would like to fill in this table with the Action Value based voltages:

Book1
BCDEFGHIJ
2ProductTestRead Time600mV700mV800mV900mV1000mV1100mV
3Device_ATest10
4Device_BTest10
5Device_CTest10
6Device_ATest111
7Device_BTest111
8Device_CTest111
Sheet3
 
Upvote 0
Welcome to the MrExcel board!

Assuming any combination will occur at most once, see if this does what you want after adjusting the data range to match your entire data.

Rsantiago125.xlsm
BCDEFGHIJ
1
2ProductTestRead Time600mV700mV800mV900mV1000mV1100mV
3Device_ATest101  1  
4Device_BTest10   1  
5Device_CTest10      
6Device_ATest111      
7Device_BTest1111     
8Device_CTest1111     
Sheet3
Cell Formulas
RangeFormula
E3:J8E3=LET(r,Sheet1!$B$3:$G$18,FILTER(INDEX(r,0,6),(INDEX(r,0,1)=$B3)*(INDEX(r,0,5)=$C3)*(INDEX(r,0,4)=$D3)*(INDEX(r,0,3)=E$2),""))
 
Upvote 0
Welcome to the MrExcel board!

Assuming any combination will occur at most once, see if this does what you want after adjusting the data range to match your entire data.

Rsantiago125.xlsm
BCDEFGHIJ
1
2ProductTestRead Time600mV700mV800mV900mV1000mV1100mV
3Device_ATest101  1  
4Device_BTest10   1  
5Device_CTest10      
6Device_ATest111      
7Device_BTest1111     
8Device_CTest1111     
Sheet3
Cell Formulas
RangeFormula
E3:J8E3=LET(r,Sheet1!$B$3:$G$18,FILTER(INDEX(r,0,6),(INDEX(r,0,1)=$B3)*(INDEX(r,0,5)=$C3)*(INDEX(r,0,4)=$D3)*(INDEX(r,0,3)=E$2),""))


Thanks. This is an awesome forum.

Your formula works but it gives an error if there's a double entry in the data:

Database:

Progress_lookup1.xlsx
BCDEFG
2ProductMonthVoltagesRead TimeTestresults
3Device_AJan600mV11test11
4Device_AJan700mV0test11
5Device_AJan700mV0test21
6Device_AFeb1000mV0test11
7Device_AFeb900mV0test11
8Device_AMar1000mV0test21
9Device_AMar1100mV0test31
10Device_BJan600mV0test11
11Device_BJan700mV0test21
12Device_BFeb800mV0test31
13Device_BFeb600mV0test11
14Device_BMar1000mV0test21
15Device_BMar1100mV0test31
16Device_CJan600mV0test11
17Device_CMar800mV0test31
18Device_CJan1000mV0test21
19Device_CMar1100mV0test31
Sheet1


Table using your formula:

Progress_lookup1.xlsx
BCDEFGHIJ
2ProductTestRead Time600mV700mV800mV900mV1000mV1100mV
3Device_ATest10 1 11 
4Device_BTest10#SPILL!     
5Device_CTest101     
6Device_ATest1111     
7Device_BTest111      
8Device_CTest111      
Sheet4
Cell Formulas
RangeFormula
E3:J8E3=LET(r,Sheet1!$B$3:$G$18,FILTER(INDEX(r,0,6),(INDEX(r,0,1)=$B3)*(INDEX(r,0,5)=$C3)*(INDEX(r,0,4)=$D3)*(INDEX(r,0,3)=E$2),""))



Also, I'm trying to understand your formula. For "INDEX(r,0,6),(INDEX(r,0,1)=$B3)", What are the 6 and 1 referring to? Are they the column? Sorry, I'm a beginner with Excel.


I was searching around Youtube last night and I found this formula using (Index and match). IT also works.
Progress_lookup1.xlsx
BCDEFGHIJ
2ProductTestRead Time600mV700mV800mV900mV1000mV1100mV
3Device_ATest10 1 11 
4Device_BTest101     
5Device_CTest101     
6Device_ATest1111     
7Device_BTest111      
8Device_CTest111      
Sheet3
Cell Formulas
RangeFormula
E3:J8E3=IFERROR(INDEX(Sheet1!$G:$G,MATCH(1,(Sheet1!$B:$B=$B3)*(Sheet1!$F:$F=$C3)*(Sheet1!$E:$E=$D3)*(Sheet1!$D:$D=E$2),0)),"")
Named Ranges
NameRefers ToCells
Sheet1!_FilterDatabase=Sheet1!$B$2:$G$19E3:J8
actions=Sheet1!$G$2:$G$19E3:J8
Products=Sheet1!$B$2:$B$19E3:J8
readtime=Sheet1!$E$2:$E$19E3:J8
results=Sheet1!$G$2:$G$19E3:J8
test=Sheet1!$F$2:$F$19E3:J8
voltages=Sheet1!$D$2:$D$19E3:J8
 
Upvote 0
Your formula works but it gives an error if there's a double entry in the data:
Yes, that is why I wrote the following last time. ;)
Assuming any combination will occur at most once ...

Whilst the formula that you have come up with will work, it requires a great deal of calculation resources, checking the values in over a million cells in each of 4 columns.
I would highly recommend restricting the number of rows checked. **

Here is the adaptation of my previous solution, given that combinations may occur more than once. Where I have used 1000, choose some number that will be greater than the number of rows you will ever have, but (hopefully) well less than 1,000,000. Even if you stick with INDEX/MATCH I would reduce the ranges.

Rsantiago125.xlsm
BCDEFGHIJ
1
2ProductTestRead Time600mV700mV800mV900mV1000mV1100mV
3Device_ATest101  1  
4Device_BTest10   1  
5Device_CTest10      
6Device_ATest111      
7Device_BTest1111     
8Device_CTest1111     
Sheet3
Cell Formulas
RangeFormula
E3:J8E3=LET(r,Sheet1!$B$3:$G$1000,INDEX(FILTER(INDEX(r,0,6),(INDEX(r,0,1)=$B3)*(INDEX(r,0,5)=$C3)*(INDEX(r,0,4)=$D3)*(INDEX(r,0,3)=E$2),""),1))


**
Further to my comments about the processing required.
I put your formula in the 36 yellow cells shown and timed how long it took Excel to calculate those 36 cells: 6.5 seconds
I then put my formula in the 36 cells and the calculation time was: 0.01 seconds (650 times faster!)

Also, if you have those named ranges in Sheet1, you could use them in the formulas.

Rsantiago125.xlsm
BCDEFGHIJ
1
2ProductTestRead Time600mV700mV800mV900mV1000mV1100mV
3Device_ATest101  1  
4Device_BTest10   1  
5Device_CTest10      
6Device_ATest111      
7Device_BTest1111     
8Device_CTest1111     
Sheet3
Cell Formulas
RangeFormula
E3:J8E3=INDEX(FILTER(actions,(Products=$B3)*(test=$C3)*(readtime=$D3)*(voltages=E$2),""),1)
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,484
Members
448,967
Latest member
visheshkotha

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