My apology in advance, I am new to asking for help but I have struggeled with this for a long time.
I have an MS Access table that stores lots of info in columns. I need to be able to record at what position the highest number appears in each column, in a new table or query. NB: The table has over 40 columns so individual query's with 'sort by max' does not work for me.
A simplified version of the table would took like this; Table1
Position | Col1 | Col2 | Col3 | Col4 |
---|---|---|---|---|
1 | 0.1 | 0.5 | 0.8 | 0.3 |
2 | 0.5 | 0.7 | 0.1 | 0.5 |
3 | 0.7 | 0.6 | 0.2 | 0.7 |
4 | 0.2 | 0.1 | 0.5 | 0.8 |
5 | 0.3 | 0.8 | 0.4 | 0.2 |
6 | 0.6 | 0.3 | 0.3 | 0.4 |
I need a new table or query that tells me what position the highest number is? The resulting table would look like this. Where Col1's highest number is at Position 3, Col2's highest number is at Position 5, Col3's highest number is at Position 1 and so on.
Col1R | Col2R | Col3R | Col4R |
---|---|---|---|
3 | 5 | 1 | 4 |
Any help or direction in VBA, SQL or Query would be greatly appreciated. (I am using MS Access 2016)
Thank you everyone for your prompt and excellent responses, I have now tried your solutions and at first they work fine however whenyou add more data they return incorrect results. I should have supplied more info to start but just wnated to keep it simple.
For some resaon I cannot edit the tables or add correctly new tables to show extended info.
please have a look a that the 2 images for new table info and the results, thank you allin advance.