Trying to copy Values from one worksheet to another worksheet based on employee number

excelmedic

New Member
Joined
Jun 12, 2013
Messages
2
Please excuse my lack of technical terminology.

I've had this "spreadsheet" thrust onto me and I am really quite limited in my Excel knowledge.

I have a mockup sheet that I had intended to upload by I can not as it involves Installing programs, which the work PC will not let me do. I will not have access to a personal PC for 2 more weeks. I am out in the sticks basically.

What I've been trying to do for the last 3 or 4 days is to copy the data from the first sheet "OHC Main" in Cells F10, H10, J10 etc..

and Paste them into sheet 2 "Records" #D, #E, #F etc.

The catch is that i need it to paste in the Row corresponding to someones employee number, and the Column corresponding to the type of test, ie: Heart Rate, Cholesterol.

I have made a macro but it will only copy into the cell that was used during the Macro.
So no matter what employee number I put in, where the Macro was recorded is the only place that changes.

I have spent maybe 18 hours on this in the last 4 days and it is absolutely killing me.
I've tried to find a similar solution online but either I not wording it right, or its not online.

Please help me, this really is doing my head in and I hope that it is a simple solution, which one of you may have dealt with in the past.


Sheet 1: OHC Main
ohcmain.png



Sheet 2: Records
recordsj.png



I am truly sorry I don't have Code to share.

Any tiny piece of Help is greatly appreciated!

Thank you for taking time to read this and I hope it makes sense.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
This is the Macro that selects the next empty cell, in line with the Employee Number

Code:
Sub FindApp()
    Dim vFind
    Dim lLoop As Long
    Dim rFound As Range
     
    Range("N3:U3").Select
    vFind = ActiveCell
    On Error Resume Next
    For lLoop = ActiveSheet.Index + 1 To Sheets.Count
        With Sheets(lLoop)
            Set rFound = .UsedRange.Find(What:=vFind, After:=.Cells(14, 3), LookIn:=xlFormulas, LookAt:= _
            xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)
            If Not rFound Is Nothing Then
                Application.Goto rFound, True
                Exit For
            End If
        End With
    Next lLoop
    
    'find last used cell on the row to the right
ActiveCell.End(xlToRight).Select


'move one cell to the right from the last used cell
ActiveCell.Offset(0, 1).Select




End Sub
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top