Input form question

  • Thread starter Thread starter Rob Hargreaves
  • Start date Start date
R

Rob Hargreaves

I have a Form made from a worksheet I plan on using it to
add information to my datasheet.

Column B has dates for every day of the year.

Formatted dd/mmm/yy

On the form I have a fixed refrence of the column letter
as this will always be the same so the information under
m3 feed will always be column E row ? for the entry to go
into.

The row number to decide the cell the information should
go into is decided by matching a date cell on the
worksheet form to the row in column b.

How can I code this into my worksheet?

Rob
 
=match(Address of Cell with date to be found,B:B,0) (B:B is column with
dates)

gives the row

Perhaps you can combine the with indirect

=Indirect("E" & match(Cell with date,B:B,0))

Qualify cell locations with worksheet names where appropriate.
 
Thanks - something like this?

So if I have a button on my worksheet form and I put -

Sub EnterData_Click()

'Paste textbox A contents into
=Indirect("E" & match(D6,B:B,0))

'Paste textbox B contents into
=Indirect("F" & match(D6,B:B,0))

'Paste textbox C contents into
=Indirect("G" & match(D6,B:B,0))

End Sub
 
My best guess would be:

set rng = Range("E" & application.Match(Range("D6"),Range("B:B"),0))
rng.Value = TextboxA.Text

similar for the others.
 
Ive been trying this- I hope I am nearly there I really
do appreciate this.

"E" being fixed column for first textbox which is
actually a cell on a worksheet at D8, D6 is where the
date is on the worksheet.

Dim Rng As Range

Set Rng = Range("E" & Application.Match(Range("D6"), Range
("B:B"), 0))
Rng.Value = Application.Worksheets("Daily").Range
("D8").Text

'D8.Text
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top