[VBA] Finding the cell based on row and column values

Trikson

Board Regular
Joined
Feb 10, 2014
Messages
61
Hi Guys,

I am currently working on tool for my team that would enable them to add events to their projects, based on date.

Currently I have a following s/s:

ABCDEFGHI
1Project Calendar2014-12-152014-12-162014-12-172014-12-182014-12-192014-12-202014-12-212014-12-22
2project1
3project2
4project3
5project4
6project5
7project6

<tbody>
</tbody>

I also have the userform where user can select the Project Name (combo box ProjectName_Box) from the list of projects, and select the date they want to create the event on (EventDate field auto-populated by clicking on desired date from MonthView calendar).

What I am struggling with is creating code that would pick these two values and find the corresponding cell. I.E. User wants to add new event for Project3 on 19th Dec 2014 so on the userform he selects Project3 from the dropdown list, and clicks on 19th Dec on MonthView calendar which populates the EventDate field with value: 2014-12-19. Now the code should take these two values then locate and select the corresponding cell - F4 in this current scenario.

Thanks in advance for any help.
 
Last edited:
Just reverted the changes, and (what occurred to me only after Andrew's post) the month and day values in the format I enforced were switched - hence macro wasn't working. Fixed that and everything looks ok now - Thank you both for your assistance and sorry for my "newbiness"

PS. Is there an option in MonthView to generate message to the user if saturday/sunday would be selected (without hardcoding the dates)? Can't seem to find anything like that but wanted to check this with you.
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,215,833
Messages
6,127,157
Members
449,367
Latest member
w88mp

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