Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I reference the cell address next to Active cell
My user choose something from the my combo box and the VBA code add the
value to the active cell. I would like to lookup this value in another range and add the result of the lookup to the right of the active cell. Your help would be appreciated. Regards Nico |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I reference the cell address next to Active cell
Hi
to reference the cell next to the active cell you may use activecell.offset(0,1).value = your_lookup_value -- Regards Frank Kabel Frankfurt, Germany Nico Le Roux wrote: My user choose something from the my combo box and the VBA code add the value to the active cell. I would like to lookup this value in another range and add the result of the lookup to the right of the active cell. Your help would be appreciated. Regards Nico |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I reference the cell address next to Active cell
Hi Nico,
In VBA? Set oFound = Worksheets("Sheet2").Range("A1:A100).Find(Acivecel l.Value) If Not oFound Is Nothing Then Activecell.Offset(0,1).Value = oFound.Offset(0,4).Value End If or alternatively Activecell.Offset(0,1).Value = WorksheetFunction.VLookup(Activecell.Value,Range(" A1:F100,4,False) Change the ,4 to the offset in the lookup range that you want in both examples. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Nico Le Roux" wrote in message ... My user choose something from the my combo box and the VBA code add the value to the active cell. I would like to lookup this value in another range and add the result of the lookup to the right of the active cell. Your help would be appreciated. Regards Nico |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I reference the cell address next to Active cell
activecell.offset(0,1).Value = ActiveCell.Value +
Application.Vlookup(activeCell.Value, _ Worksheets("Sheet2").Range("A1:A200"),2,False) -- Regards, Tom Ogilvy "Nico Le Roux" wrote in message ... My user choose something from the my combo box and the VBA code add the value to the active cell. I would like to lookup this value in another range and add the result of the lookup to the right of the active cell. Your help would be appreciated. Regards Nico |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I reference the cell address next to Active cell
Thks Frank and Tom.
"Nico Le Roux" wrote in message ... My user choose something from the my combo box and the VBA code add the value to the active cell. I would like to lookup this value in another range and add the result of the lookup to the right of the active cell. Your help would be appreciated. Regards Nico |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I reference the cell address next to Active cell
An alternative, probably faster, to ActiveCell.Offset(0,1) is
ActiveCell(1,2) Alan Beban Nico Le Roux wrote: Thks Frank and Tom. "Nico Le Roux" wrote in message ... My user choose something from the my combo box and the VBA code add the value to the active cell. I would like to lookup this value in another range and add the result of the lookup to the right of the active cell. Your help would be appreciated. Regards Nico |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
following the active cell address without recalc | Excel Worksheet Functions | |||
How can I use the active cell address as a value | Excel Discussion (Misc queries) | |||
Get Address of Active Cell | Excel Discussion (Misc queries) | |||
Getting active cell address | Excel Programming | |||
How to get the active cell address? | Excel Programming |