PC Review


Reply
Thread Tools Rate Thread

Collecting data from other worksheets...

 
 
=?Utf-8?B?YWpheWI=?=
Guest
Posts: n/a
 
      19th Feb 2007
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 With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      19th Feb 2007
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 With Quote
 
merjet
Guest
Posts: n/a
 
      19th Feb 2007
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


 
Reply With Quote
 
=?Utf-8?B?YWpheWI=?=
Guest
Posts: n/a
 
      20th Feb 2007
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 With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      20th Feb 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Collecting data Mary Lee Microsoft Excel Misc 3 20th Apr 2008 12:24 AM
help collecting data. =?Utf-8?B?YnJhbmRvbiByb2xhbmQ=?= Microsoft Excel Misc 5 8th Aug 2007 11:33 PM
Collecting data from worksheets. MrSeagull Microsoft Excel Worksheet Functions 2 7th Jul 2006 06:50 PM
collecting data from various worksheets NM3383 Microsoft Excel Worksheet Functions 1 21st Jun 2006 06:46 PM
Collecting data over web =?Utf-8?B?U2FyYSBQYXVsbGluIENhc3Rv?= Microsoft Access 1 13th May 2005 08:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:48 PM.