Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Fill Cell to the right
Hi folks
I wish to paste data from a form into the first aviable row (bed) of our ward database... Private Sub cmdAdmitPatient_Click() For Each c In Worksheets("admission").Range("B5:B29") If c.Value = " " Or c.Value = "" Then c.Value = txtName.Value '<cell to the right = txtDateOfBirth.Value '<cell to the right again = txtNextOfKin Exit For End If Next End Sub as you can see, Ive found the first blank row / bed and pasted in the patient name, how do I move to the right one cell to paste the DOB then ditto again for the next field thanks john Images of home (NZ) http://www.titahi-bay.co.nz/home What we are up to in the UK http://www.titahi-bay.co.nz |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Fill Cell to the right
Private Sub cmdAdmitPatient_Click()
dim c as range For Each c In Worksheets("admission").Range("B5:B29").cells If trim(c.Value) = "" Then c.Value = txtName.Value c.offset(0,1).value = txtDateOfBirth.Value c.offset(0,2).value = txtNextOfKin Exit For End If Next c End Sub John in Surrey wrote: Hi folks I wish to paste data from a form into the first aviable row (bed) of our ward database... Private Sub cmdAdmitPatient_Click() For Each c In Worksheets("admission").Range("B5:B29") If c.Value = " " Or c.Value = "" Then c.Value = txtName.Value '<cell to the right = txtDateOfBirth.Value '<cell to the right again = txtNextOfKin Exit For End If Next End Sub as you can see, Ive found the first blank row / bed and pasted in the patient name, how do I move to the right one cell to paste the DOB then ditto again for the next field thanks john Images of home (NZ) http://www.titahi-bay.co.nz/home What we are up to in the UK http://www.titahi-bay.co.nz -- Dave Peterson |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Fill Cell to the right
On Mon, 02 Jan 2006 13:58:29 -0600, Dave Peterson
wrote: thanks to dave and don Images of home (NZ) http://www.titahi-bay.co.nz/home What we are up to in the UK http://www.titahi-bay.co.nz |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cell borders and fill | Excel Worksheet Functions | |||
Copy cell format to cell on another worksht and update automatical | Excel Worksheet Functions | |||
auto fill data into a cell from a lookup table | Excel Discussion (Misc queries) | |||
up to 7 functions? | Excel Worksheet Functions | |||
GET.CELL | Excel Worksheet Functions |