ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Input form question (https://www.excelbanter.com/excel-programming/321989-input-form-question.html)

Rob Hargreaves

Input form question
 
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

Tom Ogilvy

Input form question
 
=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.

--
Regards,
Tom Ogilvy


"Rob Hargreaves" wrote in message
...
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




No Name

Input form question
 
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

-----Original Message-----
=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.

--
Regards,
Tom Ogilvy


"Rob Hargreaves"

wrote in message
...
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



.


Tom Ogilvy

Input form question
 
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.

--
Regards,
Tom Ogilvy

wrote in message
...
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

-----Original Message-----
=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.

--
Regards,
Tom Ogilvy


"Rob Hargreaves"

wrote in message
...
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



.




Rob

Input form question
 
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

-----Original Message-----
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.

--
Regards,
Tom Ogilvy

wrote in message
...
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

-----Original Message-----
=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.

--
Regards,
Tom Ogilvy


"Rob Hargreaves"

wrote in message
...
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


.



.



All times are GMT +1. The time now is 05:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com