PLEASE HELP!! finding intersection between two variable and inserting a value

Status
Not open for further replies.

wsk92

New Member
Joined
Jul 6, 2015
Messages
21
I've been trying for a couple weeks to create a vba that will fill out my project calendar for me. First thing i am trying to do is have the vba find the intersection between two variable and insert a string into the intersecting cell.

I have tried various things such as match, vlookup and find functions but i think i may be doing something slightly wrong....below is my various variables and an attempt to find the intersection.

Mainly having issues finding the start date from the calendar. the vba can find the startd but cannot seem to match it with a date in the calendar. and the application.goto line has always come up with an error saying object required.

ANY HELP IS MUCH APPRECIATED.

Sub COLLECT_INFO()

Dim i As Integer
Dim Weld As Variant, Elect As Variant, Paint As Variant, Assem As Variant
Dim wb1 As Workbook
Dim startd As Date ' this is the start date
Dim ARC_NUM As String ' this is the project number
Dim CALDates As Range ' this is the calendar dates
Dim EVARCs As Range ' this is the project numbers on the calendar
Dim finalrow As Integer


i = 4


Set wb1 = Application.Workbooks("EV ARC Master List (version macro).xlsm")


ARC_NUM = wb1.Sheets("Master List").cells(i, 2).Value


Workbooks("new calendar.xlsm").Activate


finalrow = Sheets("Calendar").Range("A35").End(xlUp).Row
startd = Sheets("Projects").cells(3, 5).Value
startd = Format(startd, "dd/mm/yyyy")


Set EVARCs = Sheets("calendar").Range("B3:ZZ3")
Set CALDates = Sheets("calendar").Range("A4:A34")


Dim fndcol As Range
Dim fndrow As Range


' Find column


Set fndcol = fndrange.Find(ARC_NUM, LookIn:=xlValues, lookat:=xlWhole)


'find row


'fndrange = Application.WorksheetFunction.VLookup(startd, Range("A1:A34"), fndcol.Column, False)


Set fndrow = fndrange.Find(what:=startd, LookIn:=xlValues, lookat:=xlPart)


'find intersection


Application.Goto reference:=Worksheets("calendar").Range(fndrow.Row, fndcol.Column).Activate
ActiveCell.Value = "Project Start"


End Sub
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Status
Not open for further replies.

Forum statistics

Threads
1,223,214
Messages
6,170,774
Members
452,353
Latest member
strainu

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