Update cell from form. Please help, running out of time.

Joined
Mar 17, 2015
Messages
11
Firstly sorry for my to you easy to me impossible problem.

Working in dairy need others to enter each cows daily milk production. Want form for cow by cow entry.

Row 1 Date
Colomn A cow's id no
Colomn B cows name(vlookup on form)
C: Amount of milk

VB to update now() for column, entered id for row, update value for liters of milk.

What would take me a week will take someone out there 5 mins.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Welcome to the Board!

How many people will be accessing the workbook at once? Will the workbook be on a network?

If you want to build a user form, see this tutorial: http://www.contextures.com/xlUserForm01.html

Here's some sample code that will add a Date stamp, Cow ID (TextBox1), lookup formula, Amount of milk (TextBox2):

<font face=Calibri><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> CommandButton1_Click()<br>    <SPAN style="color:#00007F">Dim</SPAN> lr <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN><br>    <SPAN style="color:#00007F">Dim</SPAN> ws <SPAN style="color:#00007F">As</SPAN> Worksheet<br>    <br>    <SPAN style="color:#00007F">Set</SPAN> ws = Sheets("Totals")<br>    lr = ws.Cells(Rows.Count, "A").End(xlUp).Row<br>    <br>    ws.Cells(lr + 1, "A").Value = <SPAN style="color:#00007F">Date</SPAN><br>    ws.Cells(lr + 1, "B").Value = Me.TextBox1.Value<br>    ws.Cells(lr + 1, "C").Value = "=LookupFormula"<br>    ws.Cells(lr + 1, "D").Value = Me.TextBox2.Value<br>    <br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

HTH,
 
Upvote 0
Hoping this makes sense.
Form%2Bso%2Bfar.gif
YAROPe_BwXfbnLl2FFs4em0dlvlSWAYBJq1CzIjor1I=w926-h302-no
 
Upvote 0
I'd change your structure so that you enter the data for each cow/day as a single row.

E.G.

Cow ID | Date | Litres

That way you can use Pivot Tables to summarize the data; as you have it structured now you can't do a whole lot.
 
Upvote 0

Forum statistics

Threads
1,215,216
Messages
6,123,669
Members
449,114
Latest member
aides

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