Macro help needed

Corbana

New Member
Joined
Nov 9, 2005
Messages
23
Hi all

No douubt this will be the first of many posts that i make, moving from excel from 123 :)

What i am trying to do, Ranges reduced to a minimum to keep it simple.

I have 2 sheets:

Sheet 1 has a range called "monday" (a1:b3) which has the following date in it

A2 - jim
A3 - sam
B1 - 7/11/2005

Sheet 2 has the range "data" (A1:B2)

A1 - jim
A2 - sam
B1 - 7
B2 - 0

what i need the macro to do is:

1. ask for date via an input box
2. find that date in sheet 1
3. get name from A1 on sheet 2
4. get number from the right of the name in A1
5. goto the date on sheet 1 and cross ref the name and then add the number as a value
6. loop until the cell is blank (in this case C1 would be the blank cell)

Hope this is explained well enough.

ty in advance

Corbana
 
I'm not authorised to go to that page. ( am not currently a member of ozgrid )
 
Upvote 0

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
all sorted rebootsed and this script now works for me

Code:
    Dim DayFind As Date
    
    DayFind = Format(DayFind, "dd/mm/yyyy")
        
    DayFind = InputBox("Enter date (dd/mm/yyyy)")

    Sheets("195D").Select
    Range("A1").Select
    Cells.Find(What:=DayFind).Activate
    ActiveCell.Offset(1, 0).Select
    Sheets("Import").Select
    Range("B2:B19").Select
    Application.CutCopyMode = False
    Selection.Copy
    Sheets("195D").Select
    ActiveSheet.Paste

thanks for all your help
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

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