Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-18-2019, 05:43 AM
Tommy7571 Tommy7571 is offline Extract a matrix of another matrix defined by selected rows marked with an x Windows 10 Extract a matrix of another matrix defined by selected rows marked with an x Office 2010
Novice
Extract a matrix of another matrix defined by selected rows marked with an x
 
Join Date: Mar 2019
Posts: 11
Tommy7571 is on a distinguished road
Default Extract a matrix of another matrix defined by selected rows marked with an x

Hello,



I have the following problem:
I have a table with data, where not always all cells shall be used, however the sequence must stay the same.
example:

Column 1 Column 2 Column 3 Column 4
x TBA 50 99
DTBP 230 99
x Azeton 50 99

In the first column a x decides if the values of the following Cells need to be used or not. Off Course the x can be in all lines or in none.
I need a virtual data matrix, which includes only marked cells and from which I can extract with VLOOKUP() or Similar the data of the activated cells.
The Matrix should only exist virtually in the formula and have the following form in the example given above

Column 1 Column 2 Column 3
TBA 50 99
Azeton 50 99

From this matrix I want to extract all data linewise.
Can anyone help me?

Thanks

Tommy7571

Last edited by Pecoflyer; 03-19-2019 at 12:15 AM. Reason: wrong Language: selected lines from a matrix
Reply With Quote
  #2  
Old 03-18-2019, 07:06 AM
xor xor is offline Extract a matrix of another matrix defined by selected rows marked with an x Windows 10 Extract a matrix of another matrix defined by selected rows marked with an x Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

Like the attached?
Attached Files
File Type: xlsx Auswahl.xlsx (9.0 KB, 8 views)
Reply With Quote
  #3  
Old 03-18-2019, 07:22 AM
Tommy7571 Tommy7571 is offline Extract a matrix of another matrix defined by selected rows marked with an x Windows 10 Extract a matrix of another matrix defined by selected rows marked with an x Office 2010
Novice
Extract a matrix of another matrix defined by selected rows marked with an x
 
Join Date: Mar 2019
Posts: 11
Tommy7571 is on a distinguished road
Default

Thanks very much, I did try to use matrix parenthesis and I found hints for such use but it did not work. Now at least I see how to work with matrix parenthesis.
Howevever, it is not fully what I wanted to obtain.
Can you merge the fields to obtain one matrix of all lines?
In principle I could also create a matrix in Excel (not virtual) to store the values but it needs to have in every cell a value like the one I showed in my posting as a result matrix. This is even the most important target, since there can be more than one line which is not used and needs to be excluded to use such values in other fields without problems...



Thanks


Tommy7571
Reply With Quote
  #4  
Old 03-18-2019, 07:47 AM
xor xor is offline Extract a matrix of another matrix defined by selected rows marked with an x Windows 10 Extract a matrix of another matrix defined by selected rows marked with an x Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

I am not sure what you mean.
Reply With Quote
  #5  
Old 03-18-2019, 08:04 AM
ArviLaanemets ArviLaanemets is offline Extract a matrix of another matrix defined by selected rows marked with an x Windows 8 Extract a matrix of another matrix defined by selected rows marked with an x Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

Maybe something like this!
Attached Files
File Type: xlsx Auswahl.xlsx (15.4 KB, 8 views)
Reply With Quote
  #6  
Old 03-18-2019, 08:05 AM
Tommy7571 Tommy7571 is offline Extract a matrix of another matrix defined by selected rows marked with an x Windows 10 Extract a matrix of another matrix defined by selected rows marked with an x Office 2010
Novice
Extract a matrix of another matrix defined by selected rows marked with an x
 
Join Date: Mar 2019
Posts: 11
Tommy7571 is on a distinguished road
Default

From the Matrix (4x3)



[x] [TBA] [50.0][99.0]
[ ][DTBP][80.0][99,8]
[x][Azeton][100][99.0]


I want to extract the Matrix (3x2) as a function of the lines
marked with x



[TBA] [50.0][99.0]
[Azeton][100][99.0]


to have an entry in each row.


Thanks


Thommy7571
Reply With Quote
  #7  
Old 03-18-2019, 08:22 AM
Tommy7571 Tommy7571 is offline Extract a matrix of another matrix defined by selected rows marked with an x Windows 10 Extract a matrix of another matrix defined by selected rows marked with an x Office 2010
Novice
Extract a matrix of another matrix defined by selected rows marked with an x
 
Join Date: Mar 2019
Posts: 11
Tommy7571 is on a distinguished road
Default

Quote:
Originally Posted by ArviLaanemets View Post
Maybe something like this!

Hello,


yes this could be a solution. It is a solution if I store the matrix data in a physical matrix. Is it possible to have the corresponding matrix as a virtual matrix - without storing it in another physical matrix?
Can I access data by VLookUp() to get the values of each line?
If I try it I get an error "Value!" (as I already got plenty times without understanding the reason...). Can you tell me why?



Can you explain a little bit how it works?
You are using a filter function but the formulas are completely new to me...



Thanks
Attached Files
File Type: xlsx Auswahl2.xlsx (15.5 KB, 8 views)
Reply With Quote
  #8  
Old 03-18-2019, 09:11 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Extract a matrix of another matrix defined by selected rows marked with an x Windows 7 64bit Extract a matrix of another matrix defined by selected rows marked with an x Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,771
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Hi and welcome
could you please provide a thread title in English please, so that our other members looking for a similar solution can find their way?
Thank you
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #9  
Old 03-18-2019, 09:15 AM
Tommy7571 Tommy7571 is offline Extract a matrix of another matrix defined by selected rows marked with an x Windows 10 Extract a matrix of another matrix defined by selected rows marked with an x Office 2010
Novice
Extract a matrix of another matrix defined by selected rows marked with an x
 
Join Date: Mar 2019
Posts: 11
Tommy7571 is on a distinguished road
Default

Quote:
Originally Posted by Pecoflyer View Post
Hi and welcome
could you please provide a thread title in English please, so that our other members looking for a similar solution can find their way?
Thank you

Off course I already tried but it was not possible to edit the title.

"Extract a matrix of another matrix defined by selected rows marked with an x"


Can you edit it ?


Thanks


Tommy7571
Reply With Quote
  #10  
Old 03-18-2019, 11:32 AM
xor xor is offline Extract a matrix of another matrix defined by selected rows marked with an x Windows 10 Extract a matrix of another matrix defined by selected rows marked with an x Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

I don't know if the attached can be of some inspiration.

Be aware however that it makes use of the function TEXTJOIN which I think is only available in the newest version of Excel.
Attached Files
File Type: xlsx Extract_Rows.xlsx (10.7 KB, 7 views)
Reply With Quote
  #11  
Old 03-18-2019, 01:06 PM
Tommy7571 Tommy7571 is offline Extract a matrix of another matrix defined by selected rows marked with an x Windows 10 Extract a matrix of another matrix defined by selected rows marked with an x Office 2010
Novice
Extract a matrix of another matrix defined by selected rows marked with an x
 
Join Date: Mar 2019
Posts: 11
Tommy7571 is on a distinguished road
Default

Quote:
Originally Posted by ArviLaanemets View Post
Maybe something like this!

It works in the file you sent me but not in the file I am working with.
I get only error message whatever I do...


Can you help me?


Tommy7571
Reply With Quote
  #12  
Old 03-18-2019, 10:13 PM
Tommy7571 Tommy7571 is offline Extract a matrix of another matrix defined by selected rows marked with an x Windows 10 Extract a matrix of another matrix defined by selected rows marked with an x Office 2010
Novice
Extract a matrix of another matrix defined by selected rows marked with an x
 
Join Date: Mar 2019
Posts: 11
Tommy7571 is on a distinguished road
Default

Quote:
Originally Posted by xor View Post
I don't know if the attached can be of some inspiration.

Be aware however that it makes use of the function TEXTJOIN which I think is only available in the newest version of Excel.

This doesn't help me. I could not use the resulting structure for the work I want to do.


Thanks for the trial...


Tommy7571
Reply With Quote
  #13  
Old 03-19-2019, 12:16 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Extract a matrix of another matrix defined by selected rows marked with an x Windows 7 64bit Extract a matrix of another matrix defined by selected rows marked with an x Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,771
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Quote:
Originally Posted by Tommy7571 View Post
"Extract a matrix of another matrix defined by selected rows marked with an x"
Can you edit it ?

Thank you - Done


And BTW, do not quote entire posts unnecessarily. If they are out of sequence, just quote what is necessary to make your post understandable. It makes threads easier to read
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #14  
Old 03-19-2019, 12:39 AM
ArviLaanemets ArviLaanemets is offline Extract a matrix of another matrix defined by selected rows marked with an x Windows 8 Extract a matrix of another matrix defined by selected rows marked with an x Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

Quote:
Originally Posted by Tommy7571 View Post
It is a solution if I store the matrix data in a physical matrix. Is it possible to have the corresponding matrix as a virtual matrix - without storing it in another physical matrix?
What is the meaning of "matrix" in your context? I am not very proficient with german IT terminology (the last time I used it at some elementary level was some 15 years ago in german Excel and Access newsgroups), and I haven't never encountered such use of it!

Generally, on worksheet to refer to some data you must have those data displayed somewhere (in cell, or in table). You can have the data you refer to on hidden worksheet, or in hidden columns of table, but you must have them somewhere.

An exception are named dynamical values, where you create a name which value is calculated based on position of cell the named value is used.

And you can create your own UDF's (User Defined Function), which you can use instead of very complex formulas.

In any of those cases the final formula must read some data from some place in workbook, and must be entered into some cell.

In VBA procedures, you can define arrays (those can have many dimensions). But generally, those arrays exist only until the procedure is running. Probably it is possible define such arrays as global, but anyway you can access them only in VBA.

Quote:
Originally Posted by Tommy7571 View Post
Can I access data by VLookUp() ... If I try it I get an error "Value!"... Can you tell me why?
The syntax was wrong. It must be
Code:
=IF(tSelection[@Field1]="";"";VLOOKUP(tSelection[@Field1];tSelection;2;0))
, but I'd prefer
=IFERROR(INDEX(tSelection[Field2];tSelection[@RowNo]);"")
VLOOKUP returns entry from 1st matching row. When there is several indentical entries in Field1, you are in trouble. The 2nd formula doesn't have such problems.

Parameters used in lookup are:
1. The value you are searching for in 1st column of search range;
2. The search range;
3. The number of column in search range from where the result is returned;
4. 0 is for exact match - i.e. formula returns an error when search value is not found. Other values for 4th parameter are more difficult to handle, and the search range must be ordered by search value.

Quote:
Originally Posted by Tommy7571 View Post
Can you explain a little bit how it works?
You are using a filter function but the formulas are completely new to me...
I used Table formulas. With Table I mean the entity defined from menu Insert>Table. With defined Table you can use specific syntax to refer to various regions of Table.

Useful feature of Tables is, that whenever you enter something into any cell immediately below any cell of last row of Table, the Table is expanded automatically. And any formats, conditional formattings, data validations, or formulas are expanded too, until there is only one of kind defined for whole column.
Reply With Quote
  #15  
Old 03-19-2019, 05:12 AM
Tommy7571 Tommy7571 is offline Extract a matrix of another matrix defined by selected rows marked with an x Windows 10 Extract a matrix of another matrix defined by selected rows marked with an x Office 2010
Novice
Extract a matrix of another matrix defined by selected rows marked with an x
 
Join Date: Mar 2019
Posts: 11
Tommy7571 is on a distinguished road
Default Extract a matrix of another matrix defined by selected rows marked with an x

<<Generally, on worksheet to refer to some data you must have those data <<displayed somewhere (in cell, or in table). You can have the data you refer to on <<hidden worksheet, or in hidden columns of table, but you must have them <<somewhere.


Ok. Anyway it is not a problem to create a hidden table somewhere and it is better. Perhaps I confued with programming techniques and I don't want to use these. So I will do it like this.


<<The syntax was wrong. It must be
Code:
=IF(tSelection[@Field1]="";"";VLOOKUP(tSelection[@Field1];tSelection;2;0))
Thanks very much I don't even understand why I wrote this formula like this. Perhaps because I am not very used to use the VLookUp -function...


<<, but I'd prefer
Code:
=IFERROR(INDEX(tSelection[Field2];tSelection[@RowNo]);"")
<VLOOKUP returns entry from 1st matching row. When there is several indentical <entries in Field1, you are in trouble. The 2nd formula doesn't have such problems.

To have the same entry two times is not reasonable in my case. As far as I know the iferror function is not recommended since it often gives an error without giving a hint on the error.



<I used Table formulas. With Table I mean the entity defined from menu <Insert>Table. With defined Table you can use specific syntax to refer to various <regions of Table. Useful feature of Tables is, that whenever you enter something <into any cell immediately below any cell of last row of Table, the Table is expanded <automatically. And any formats, conditional formattings, data validations, or <formulas are expanded too, until there is only one of kind defined for whole column.


Great! Thanks very much. I never used such type of tables and it is very interesting.


I established the same table in my excel sheet and put the filter function in each of the consiedered table columns. I created a range named "Analyte" in the name manager and even took the same names for the considered columns.

As in your table tData, I put the function on the right of the table in the column RowNo.
=ZEILE()-ZEILE($D$7)+1 works but

ZEILE()-ZEILE(Analyte[[#Kopfzeilen];[RowNo]]) doesn't :



I used the following article to study the method:



https://www.huegemann-informatik.de/...excel-tabellen


According to this article there should be no problem with my function...

However, I still get the same error. Hints are so general that they do not help...



the following code

Code:
=WENN([@Selected]="x";ZÄHLENWENNS([Selected];"x";[RowNo];"<=" & [@RowNo]);"")


has been put in the column SelectedRowNo. It also gives an error.
What is @Selected ? Where is it defined?
In the attachment I deleted = to avoid error messages.



I did not even try to work on the table selections...


Any idea where the problems could be since the tables of your excel file works...
I wasted hours for this and see no solution.



Thanks


Tommy7571
Attached Files
File Type: xlsx Test.xlsx (13.8 KB, 6 views)
Reply With Quote
Reply

Tags
matrix, sverweis



Similar Threads
Thread Thread Starter Forum Replies Last Post
Zeilen vergleichen und Meldung ausgeben Bravo Excel 1 02-23-2018 06:31 AM
Extract a matrix of another matrix defined by selected rows marked with an x 2nd matrix gives a resut that doesn´t match numbers in the 1st matrix Diver Excel 25 02-22-2017 04:39 PM
How to get value through a matrix? Xemx Excel 3 10-21-2014 05:46 AM
Extract a matrix of another matrix defined by selected rows marked with an x Dot Matrix Printing Angela Office 2 05-15-2012 08:56 PM
Matrix Algebra judicial85 Excel 3 10-12-2011 05:41 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:05 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft