smart timetable - find cell and insert 'value'

desmond_

Board Regular
Joined
Jan 4, 2017
Messages
59
dear experts,

i was thinking about an automatized timetable which could look like this
i insert the month/year in the first column and the related cell will be entered with whatever value 'x'

[TABLE="width: 500"]
<tbody>[TR]
[TD]insert month here[/TD]
[TD]01[/TD]
[TD]02[/TD]
[TD]03[/TD]
[TD]04[/TD]
[TD]05[/TD]
[TD]06[/TD]
[TD]07[/TD]
[TD]08[/TD]
[TD]09[/TD]
[TD]10[/TD]
[TD]11[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD="align: center"]01[/TD]
[TD]'x'[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]08[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]'x'[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

since INDEX(MATCH) is somehow the reversed function i guess this should be possible.
i just have no idea how to write the vba code.

do you have some help/suggestions

thanks in advance !
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Assuming that your header is row 1 & Month is col A, try
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
   
   Dim Fnd As Range
   If Target.CountLarge > 1 Then Exit Sub
   If Not Target.Column = 1 Then Exit Sub
Application.EnableEvents = False
   Set Fnd = Rows(6).Find(Target.Value, , xlValues, xlWhole, , , False, , False)
   If Not Fnd Is Nothing Then Target.Offset(, Fnd.Column - 1) = "X"
Application.EnableEvents = True
End Sub
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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