Need to view sheet3 data in sheet1....help

riverotter

New Member
Joined
Aug 8, 2010
Messages
5
Hello all excel experts. I have a fairly simple problem that my inexperience is making difficult.I have a column A and column G list generated in Sheet3. I have build a simple droplist interface in sheet1 to fill in the additional data for Sheet3 columns B,C,D,E & F. Here is my problem. I need the listed items from sheet3 columns A & G to appear one at a time in sheet1 cells 14G and 14 L respectively so that I know where in the list I am so that I can enter the correct data. Once I" have entered to correct data and clicked the submit button, I need the next two pieces of data from sheet3 columns A & G to appear so that I can continue the process.

I have written several macros to try to accomplish this, but sadly they all failed.
I look forward to hearing any ideas or suggestions you may have to unravel this riddle of mine

Thank you, Aaron
 

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,166
This is just an example but you could use a public variable to keep track of what row you're on and add one to it when you want to advance to the next row.

Example:
Code:
Public RowNumb As Long

Sub Initialize_Rownumb()
    
    RowNumb = 2
    Sheets("Sheet1").Range("G14").Value = Sheets("Sheet3").Range("A" & RowNumb).Value
    Sheets("Sheet1").Range("L14").Value = Sheets("Sheet3").Range("G" & RowNumb).Value
    
End Sub


Sub NextRow()
    
    If RowNumb + 1 > Sheets("Sheet3").Range("A" & Rows.Count).Row Then
        MsgBox "You are at the Bottom of the list", vbExclamation, "Bottom"
        Exit Sub
    End If
    
    RowNumb = RowNumb + 1
    
    Sheets("Sheet1").Range("G14").Value = Sheets("Sheet3").Range("A" & RowNumb).Value
    Sheets("Sheet1").Range("L14").Value = Sheets("Sheet3").Range("G" & RowNumb).Value
    
End Sub

Sub PreviousRow()

    If RowNumb - 1 < 2 Then
        MsgBox "You are at the Top of the list", vbExclamation, "Top"
        Exit Sub
    End If

    RowNumb = RowNumb - 1
    
    Sheets("Sheet1").Range("G14").Value = Sheets("Sheet3").Range("A" & RowNumb).Value
    Sheets("Sheet1").Range("L14").Value = Sheets("Sheet3").Range("G" & RowNumb).Value
    
End Sub
 

riverotter

New Member
Joined
Aug 8, 2010
Messages
5
THANK YOU, ALPHAFROG or should I call you Merlin?

I am going to give this a try. It looks like you have done all the heavy lifting for me here. I am hoping that I can work the rest of it. I will be sure to update you on the results. Thanks again for your expertise!!

Aaron
 

riverotter

New Member
Joined
Aug 8, 2010
Messages
5
I have applied the code provided to my program and it works flawlessly !!

In this next stage of development I am having trouble getting some of the features to work togather. I have 4 dropdown menues in sheet1( not in cell menues.) these menues correspond to sheet3.cells B, C, D, E. First, I can not figure out how to link these drop menues to the cells on sheet3. Second, I can not figure out how to make the selected cells for sheet1 dropdown menus inputting data into sheet3 move down (or up)in sync with the data presented in sheet1 from sheet3 cells A & G ( see above post.)

I hope I have explained the issue with sufficianet detail for an expert evaluation. I look forward to your continued guidance.

Thank you, Aaron
 

Forum statistics

Threads
1,081,556
Messages
5,359,547
Members
400,533
Latest member
fpenning

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top