ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Matching with respect to another column? (https://www.excelbanter.com/excel-programming/435659-matching-respect-another-column.html)

Doug

Matching with respect to another column?
 
I have a table in worksheet A, and imported data that is refreshed every half
hour in worksheet B.
I would like to update the data in worksheet A column AB with respect to the
symbols in column P. The data will be pulled from the import data in
worksheet B.
The columns are the same in both worksheet A, and worksheet B to make it
easier.
How can I do this?
--
Thank you!

joel[_159_]

Matching with respect to another column?
 

There is a VBA help topic

Using Events with the QueryTable Object


You can use this event to copy the results of the query from sheet B to
sheet A. Only copy the items that you need updated. I can help with
the code if needed.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=149960

<a href="http://www.thecodecage.com">Microsoft Office Help</a>


Sam Wilson

Matching with respect to another column?
 
Hi,

There are many ways...

1. VLOOKUP - put this in sheet1 column AB2 and drag down:

=VLOOKUP(P2,Sheet2!P:AB,13,false)

2. SUMIF (if you want to add sheet2, column P figures together like a summary)

= SUMIF(Sheet2!P:P,P2,Sheet2!AB:AB)

there are other ways, those two are the easiest.

Sam

"Doug" wrote:

I have a table in worksheet A, and imported data that is refreshed every half
hour in worksheet B.
I would like to update the data in worksheet A column AB with respect to the
symbols in column P. The data will be pulled from the import data in
worksheet B.
The columns are the same in both worksheet A, and worksheet B to make it
easier.
How can I do this?
--
Thank you!


joel[_161_]

Matching with respect to another column?
 

Sam : Since this is the results of a query the number of items returned
could be different each time and a single lookup may not be sufficient
to perform the request.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=149960

<a href="http://www.thecodecage.com">Microsoft Office Help</a>


Sam Wilson

Matching with respect to another column?
 
Hi Joel,

Yes, I know that - referring to Doug's other post ("macro on a timer") the
query results are stock codes & prices. I've made an assumption that there
will be a 1-1 correspondence.

Sam

"joel" wrote:


Sam : Since this is the results of a query the number of items returned
could be different each time and a single lookup may not be sufficient
to perform the request.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=149960

<a href="http://www.thecodecage.com"Microsoft Office Help</a

.


Doug

Matching with respect to another column?
 
That works great
--
Thank you!


"Sam Wilson" wrote:

Hi,

There are many ways...

1. VLOOKUP - put this in sheet1 column AB2 and drag down:

=VLOOKUP(P2,Sheet2!P:AB,13,false)

2. SUMIF (if you want to add sheet2, column P figures together like a summary)

= SUMIF(Sheet2!P:P,P2,Sheet2!AB:AB)

there are other ways, those two are the easiest.

Sam

"Doug" wrote:

I have a table in worksheet A, and imported data that is refreshed every half
hour in worksheet B.
I would like to update the data in worksheet A column AB with respect to the
symbols in column P. The data will be pulled from the import data in
worksheet B.
The columns are the same in both worksheet A, and worksheet B to make it
easier.
How can I do this?
--
Thank you!



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

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