ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Is there a simple function code to do it?. (https://www.excelbanter.com/excel-programming/374405-there-simple-function-code-do.html)

A[_4_]

Is there a simple function code to do it?.
 
Hello,
I have a problem here in Italy...

I have this collection (array):

id name_x name_y value
--- ------------ ----------- --------
1 alfa beta 10
2 beta gamma 100
3 gamma gamma 1000
.... ........... .......... ...........

And I have this blank Excel file (only the name of the first row and
column):

alfa beta gamma
--------------------------------------
alfa
beta
gamma


I need to search for the exact coordinates and put the value in the
collection in the excel file...like this:

alfa beta gamma
-------------------------------------------
alfa 10
beta 100
gamma 1000


Is there any simple code to do that?.
Thank you in advance.

Ale.


Jim Thomlinson

Is there a simple function code to do it?.
 
Why not use a pivot table. Pace you rcursor in the middle of the data and
select Data - Pivot Table - follow the wizard (or just choose finish as XL
will normally make all of the correct assumptions).

Place the X's in the left column and the Y's across the top and the values
in the middle...
--
HTH...

Jim Thomlinson


"A" wrote:

Hello,
I have a problem here in Italy...

I have this collection (array):

id name_x name_y value
--- ------------ ----------- --------
1 alfa beta 10
2 beta gamma 100
3 gamma gamma 1000
.... ........... .......... ...........

And I have this blank Excel file (only the name of the first row and
column):

alfa beta gamma
--------------------------------------
alfa
beta
gamma


I need to search for the exact coordinates and put the value in the
collection in the excel file...like this:

alfa beta gamma
-------------------------------------------
alfa 10
beta 100
gamma 1000


Is there any simple code to do that?.
Thank you in advance.

Ale.



Bob Phillips

Is there a simple function code to do it?.
 
Assuming the results table is in H1:K5, in J2 use

=IF(ISNA(MATCH(1,($H2=$B$1:$B$20)*(I$1=$C$1:$C$20) ,0)),"",INDEX($D$1:$D$20,M
ATCH(1,($H2=$B$1:$B$20)*(I$1=$C$1:$C$20),0)))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

Copy down and across.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"A" wrote in message
ups.com...
Hello,
I have a problem here in Italy...

I have this collection (array):

id name_x name_y value
--- ------------ ----------- --------
1 alfa beta 10
2 beta gamma 100
3 gamma gamma 1000
... ........... .......... ...........

And I have this blank Excel file (only the name of the first row and
column):

alfa beta gamma
--------------------------------------
alfa
beta
gamma


I need to search for the exact coordinates and put the value in the
collection in the excel file...like this:

alfa beta gamma
-------------------------------------------
alfa 10
beta 100
gamma 1000


Is there any simple code to do that?.
Thank you in advance.

Ale.




Bob Phillips

Is there a simple function code to do it?.
 
J2 should be I2.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"A" wrote in message
ups.com...
Hello,
I have a problem here in Italy...

I have this collection (array):

id name_x name_y value
--- ------------ ----------- --------
1 alfa beta 10
2 beta gamma 100
3 gamma gamma 1000
... ........... .......... ...........

And I have this blank Excel file (only the name of the first row and
column):

alfa beta gamma
--------------------------------------
alfa
beta
gamma


I need to search for the exact coordinates and put the value in the
collection in the excel file...like this:

alfa beta gamma
-------------------------------------------
alfa 10
beta 100
gamma 1000


Is there any simple code to do that?.
Thank you in advance.

Ale.




A[_4_]

Is there a simple function code to do it?.
 

Jim Thomlinson ha scritto:

Why not use a pivot table. Pace you rcursor in the middle of the data and
select Data - Pivot Table - follow the wizard (or just choose finish as XL
will normally make all of the correct assumptions).

Place the X's in the left column and the Y's across the top and the values
in the middle...
--
HTH...

Jim Thomlinson


Thanks for fast reply.
Yes, this works. But I must insert the values in a particular excel
file, making some procedures before putting the values in it so, I
can't go for a basic Pivot Table. Another idea? Thanks.

Ale.



All times are GMT +1. The time now is 02:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com