Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA set range according to find
To the Excel guru's out there,
I have a few questions about vba and finding information. Here is the requirements: I have three check boxes, checkbox1, checkbox2 and checkbox3. Checkbox1 refers to employee name, checkbox2 refers to destination and checkbox3 refers to locatation. I have a vba code that automatically types out the information which the receptionist must ask, example: dim a as range dim b as range dim c as range set a = sheet1.range("A10") set b = sheet1.range("A11") set c = sheet1.range("A12") a.value = Employee First Name: b.value = Employee Surname: c.value = Employee Address: Now the above is the same for checkbox2 and checkbox3 except located at different range values. I have been requested to add a inputbox which will prompt the receptionist to enter how many employees (this has been done). It will then copy the selected range and paste the selection directly after c.value - the other checkboxes will also have prompts linked to them and so more information could be added. The problem is that the checkbox2 and checkbox3 values will now replace the copied ranges with their values. The other problem is that the receptionist might only use checkbox1 and checkbox3, not checkbox2. I have been requested that the information on checkbox1 be kept together as well as the information for checkbox3. I have tried using the cell.find option to get the first string of text from checkbox2 but seem to get errors if the value cannot be found. After the address is located, I need to set range a.value to the line above checkbox2 but only if it is found. Obveoulsy the line above checkbox3 if there is not checkbox2 selected, etc. This comes accross extremely confusing and so I hope someone can understand the method behind this madness. Thanks in advance. Chris |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find Last cell in Range when range is date format | Excel Discussion (Misc queries) | |||
Find a range of values in a range of cells | Excel Worksheet Functions | |||
Find the POSITION IN A RANGE of text in a string that matches value(s) in a range | Excel Programming | |||
Find dates in a range; then sum values in that range by a criteria | Excel Discussion (Misc queries) | |||
Find first cell in range and expand range -VBA | Excel Programming |