If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > how display info from sheet 2 and display on sheet 1

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-02-04, 20:47
josephg josephg is offline
Registered User
 
Join Date: Sep 2003
Posts: 31
how display info from sheet 2 and display on sheet 1

How can I diplay information for user from sheet2 on sheet1 cell C by cliking on user name on sheet 1

Sheet 1
Joe 987651
john 554654
Steve 876768
mark 65656

Sheet 2
Name joe
Address 22 oxford st
Phone 987651

Name mark
Address 2 Qeen st
Phone 65656

Name Steve
Address 2 king st
Phone 876768

Name john
Address 23 adndree
Phone 554654
Reply With Quote
  #2 (permalink)  
Old 02-03-04, 00:41
Smitty Smitty is offline
Registered User
 
Join Date: Dec 2003
Location: San Diego, CA
Posts: 153
Maybe hyperlink with VLOOKUPS?

It's not really clear how you have things set up, bu from your example it would seem easier to use Excel's native format and not split your information with blank rows.

Smitty
Reply With Quote
  #3 (permalink)  
Old 02-03-04, 08:43
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
Or you could put something like this into the View Code as a Selection Change. This assumes that the column for selection is Column A. By selecting any cell between 4 and 70 in Column, it will take the user to the "Wahtever" named range.

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If ActiveCell.Column < 2 Then
        If ActiveCell.Row < 4 Then
            Exit Sub
        ElseIf ActiveCell.Row > 70 Then
            Exit Sub
        Else
            Sheets("Sheet1").Range("A2") = ActiveCell.Value

            Application.Goto Reference:="Whatever"  '(defined name, refering to a specific cell).

        End If
                
    End If

End Sub
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
  #4 (permalink)  
Old 02-03-04, 19:06
josephg josephg is offline
Registered User
 
Join Date: Sep 2003
Posts: 31
diplay info from sheet2 on sheet1

Thank you for your help, I tried your code but it did not worked
I am attaching the Excel sample file with the code you have supplied but it does not work, could you please assist
Attached Files
File Type: zip book1.zip (6.6 KB, 30 views)
Reply With Quote
  #5 (permalink)  
Old 02-04-04, 14:38
Dcutler Dcutler is offline
Registered User
 
Join Date: Aug 2003
Location: Phoenix, AZ
Posts: 12
Look at the attached sample.

I would recommend putting all the data, including your list of Names & #'s on sheet2, organized in rows (ie joe in A1, address in B1, # in C1).
(which I have done in sample).
You can use a combo box to select the name/# combination(should put on Sheet!2 also), put the selection in a cell under the box, then use Vlookup to bring in the data for that person you want. You can have each field be in its own cell, or concatenate into one cell(I did it this way).
Attached Files
File Type: zip book1.zip (10.4 KB, 25 views)
Reply With Quote
  #6 (permalink)  
Old 02-04-04, 17:48
josephg josephg is offline
Registered User
 
Join Date: Sep 2003
Posts: 31
Dcutler

It is not possible to put the data in in rows, because the data file for each customers are more that 3 lines and varies by customers some times more than 20 lines.
I must say customers data file are separted by new line as I have shown you in my sample file
Reply With Quote
  #7 (permalink)  
Old 02-06-04, 08:30
Dcutler Dcutler is offline
Registered User
 
Join Date: Aug 2003
Location: Phoenix, AZ
Posts: 12
Is the same kind of data always in the same row, i.e., is the name always in Row 1, Address Row 2, etc?

If there is missing data, i.e., there is no address, does that come through as a blank row?

What is the source of the data? Is it manually keyed into this excel sheet, or does it originate from an outside database or program?
If so, what program or database is it coming from?
Reply With Quote
  #8 (permalink)  
Old 02-09-04, 01:14
josephg josephg is offline
Registered User
 
Join Date: Sep 2003
Posts: 31
Answer to you questions:
The data file is exported to sheet2
If there is missing data, it does not come in blank raw, the next raw is phone,
example if address2 is missing for name mark then we get
Name mark
Phone 65656

If the phone raw is missing, simply there is empty line and after that there is another name with address and phone
Example
Name mark
Address 2 Qeen st
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On