Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Collecting data from other worksheets...

Hi all,

I hope you can help.

I have a workbook with 25 sheets. Each sheet contains a separate customer
with details about their account.

I want to be able to have a sheet at the front of the workbook that will
give me a drop down selection list with the list of customer's names in.
When I select the customer's name I want the front sheet to be populated with
the data from the customer's worksheet.

I can do the easy bit of creating the drop down list but I can't figure out
how to get excel to go to the relevant worksheet for that customer and copy
the data across. I'm guessing I need to use a lookup or something but I'm
really stuck.

Can anyone help out?

Thanks

Andy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Collecting data from other worksheets...

Assume the dropdown list is in A1

in B1

=if(A1<"",Indirect("'"&A1&"'!B1"),"")

if A1 contains Johnson, Donald then the reference becomes

='Johnson, Donald'!B1

and brings in the data from cell b1 in the sheet named Johnson, Donald

--
Regards,
Tom Ogilvy





"ajayb" wrote:

Hi all,

I hope you can help.

I have a workbook with 25 sheets. Each sheet contains a separate customer
with details about their account.

I want to be able to have a sheet at the front of the workbook that will
give me a drop down selection list with the list of customer's names in.
When I select the customer's name I want the front sheet to be populated with
the data from the customer's worksheet.

I can do the easy bit of creating the drop down list but I can't figure out
how to get excel to go to the relevant worksheet for that customer and copy
the data across. I'm guessing I need to use a lookup or something but I'm
really stuck.

Can anyone help out?

Thanks

Andy

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Collecting data from other worksheets...

Put this (or similar) in the ComboBox's Change event.

For iCol = 1 To 4
Sheets("Sheet1").Cells(1, iCol) = Sheets(ComboBox1.Value).Cells(1,
iCol)
Next iCol

Hth,
Merjet


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Collecting data from other worksheets...

Hi Tom,

Thank you for that, it worked perfectly.

I have amended it to read as follows:

=IF(A1="Clear","",(IF(A1<"",INDIRECT("'"&A1&"'!B1 "),"")))

So that "Clear" may be selected to wipe the sheet clean. However, I am now
stuck on this:

When the function is referring to a cell on another sheet that is empty it
puts 0. How can I stop that?

Any ideas?

Thanks

Andy

"Tom Ogilvy" wrote:

Assume the dropdown list is in A1

in B1

=if(A1<"",Indirect("'"&A1&"'!B1"),"")

if A1 contains Johnson, Donald then the reference becomes

='Johnson, Donald'!B1

and brings in the data from cell b1 in the sheet named Johnson, Donald

--
Regards,
Tom Ogilvy





"ajayb" wrote:

Hi all,

I hope you can help.

I have a workbook with 25 sheets. Each sheet contains a separate customer
with details about their account.

I want to be able to have a sheet at the front of the workbook that will
give me a drop down selection list with the list of customer's names in.
When I select the customer's name I want the front sheet to be populated with
the data from the customer's worksheet.

I can do the easy bit of creating the drop down list but I can't figure out
how to get excel to go to the relevant worksheet for that customer and copy
the data across. I'm guessing I need to use a lookup or something but I'm
really stuck.

Can anyone help out?

Thanks

Andy

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Collecting data from other worksheets...

You would work this concept into your existing formula:

=IF(Sheet2!A1="","",Sheet2!A1)

or
=IF(ISBLANK(Sheet2!A1),"",Sheet2!A1)

It doesn't make the cell truly empty, but it appears so. (you can't have an
empty cell if there is a formula in it).

--
Regards,
Tom Ogilvy


"ajayb" wrote:

Hi Tom,

Thank you for that, it worked perfectly.

I have amended it to read as follows:

=IF(A1="Clear","",(IF(A1<"",INDIRECT("'"&A1&"'!B1 "),"")))

So that "Clear" may be selected to wipe the sheet clean. However, I am now
stuck on this:

When the function is referring to a cell on another sheet that is empty it
puts 0. How can I stop that?

Any ideas?

Thanks

Andy

"Tom Ogilvy" wrote:

Assume the dropdown list is in A1

in B1

=if(A1<"",Indirect("'"&A1&"'!B1"),"")

if A1 contains Johnson, Donald then the reference becomes

='Johnson, Donald'!B1

and brings in the data from cell b1 in the sheet named Johnson, Donald

--
Regards,
Tom Ogilvy





"ajayb" wrote:

Hi all,

I hope you can help.

I have a workbook with 25 sheets. Each sheet contains a separate customer
with details about their account.

I want to be able to have a sheet at the front of the workbook that will
give me a drop down selection list with the list of customer's names in.
When I select the customer's name I want the front sheet to be populated with
the data from the customer's worksheet.

I can do the easy bit of creating the drop down list but I can't figure out
how to get excel to go to the relevant worksheet for that customer and copy
the data across. I'm guessing I need to use a lookup or something but I'm
really stuck.

Can anyone help out?

Thanks

Andy

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
Collecting data Lynda Excel Discussion (Misc queries) 0 May 24th 10 03:30 PM
Collecting data Mary Lee Excel Discussion (Misc queries) 3 April 20th 08 12:24 AM
Help Collecting Data Mark Excel Discussion (Misc queries) 1 January 31st 08 06:45 PM
Collecting data from worksheets. MrSeagull Excel Worksheet Functions 2 July 7th 06 06:50 PM
collecting data from various worksheets NM3383 Excel Worksheet Functions 1 June 21st 06 06:46 PM


All times are GMT +1. The time now is 10:17 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"