Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default IF function using two worksheets and various data

I have one worksheet that has stock numbers in one row and account numbers in
one column. On my other worksheet, I have account and stock and prices in
separate columns. I want to populate my first worksheet with the prices that
are on my second worksheet without having to retype in all the data. It is
over 200 different stocks and will take a lot of time. Thank you for any
help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,203
Default IF function using two worksheets and various data

You should be able to do this with the SUMPRODUCT() function.

On the sheet that needs to be filled in with prices, I assume your Account
numbers are in column A, beginning at row 2, while your stock numbers are in
row 1 starting in column B.

On the other sheet I assume everything starts on row 2, with labels in row 1
and column A with Account numbers, column B with stock numbers and column C
with prices.

In cell B2 on the first sheet, enter the following formula (changing the
reference to row 9 to the last row number used on the second sheet, and the
sheet name) and fill it down and to the right in your table:
=SUMPRODUCT(--(Sheet2!$A$2:$A$9=$A2),--(Sheet2!$B$2:$B$9=B$1),--(Sheet2!$C$2:$C$9))

Note: that is all on one line in your cell, not on 2 lines as this forum may
break it into.

Hope this helps.


"nidabland" wrote:

I have one worksheet that has stock numbers in one row and account numbers in
one column. On my other worksheet, I have account and stock and prices in
separate columns. I want to populate my first worksheet with the prices that
are on my second worksheet without having to retype in all the data. It is
over 200 different stocks and will take a lot of time. Thank you for any
help.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default IF function using two worksheets and various data

Actually, on the empty sheet, my account numbers are in column A, row 4 and
my stock numbers start on row 3, column D. I tried this formula but it
didn't populate the way I wanted. I need the prices on sheet 2 to just
transfer to the right cell in sheet 1. The difference between the two sheets
is that the first (empty) sheet is all my numbers separated by stock while
the second is just in columns of data.
Thanks anyway.
"JLatham" wrote:

You should be able to do this with the SUMPRODUCT() function.

On the sheet that needs to be filled in with prices, I assume your Account
numbers are in column A, beginning at row 2, while your stock numbers are in
row 1 starting in column B.

On the other sheet I assume everything starts on row 2, with labels in row 1
and column A with Account numbers, column B with stock numbers and column C
with prices.

In cell B2 on the first sheet, enter the following formula (changing the
reference to row 9 to the last row number used on the second sheet, and the
sheet name) and fill it down and to the right in your table:
=SUMPRODUCT(--(Sheet2!$A$2:$A$9=$A2),--(Sheet2!$B$2:$B$9=B$1),--(Sheet2!$C$2:$C$9))

Note: that is all on one line in your cell, not on 2 lines as this forum may
break it into.

Hope this helps.


"nidabland" wrote:

I have one worksheet that has stock numbers in one row and account numbers in
one column. On my other worksheet, I have account and stock and prices in
separate columns. I want to populate my first worksheet with the prices that
are on my second worksheet without having to retype in all the data. It is
over 200 different stocks and will take a lot of time. Thank you for any
help.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function for counting Worksheets? JonWardellBuilders Excel Worksheet Functions 2 November 10th 08 06:44 PM
Function to sum same cell in several worksheets Stephen White Excel Discussion (Misc queries) 5 July 15th 08 07:30 AM
Using SUMIF Function to get data from several worksheets Kazmaniac Excel Worksheet Functions 3 October 2nd 07 02:02 PM
Function to Return another Worksheets Name Dawg House Inc Excel Worksheet Functions 7 March 22nd 05 07:10 PM
Assigning Cells in worksheets to other data in other worksheets. David McRitchie Excel Discussion (Misc queries) 0 November 27th 04 06:15 PM


All times are GMT +1. The time now is 03:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"