Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
following the active cell address without recalc haystack Excel Worksheet Functions 3 November 13th 08 01:48 AM
How can I use the active cell address as a value mohavv Excel Discussion (Misc queries) 2 April 18th 08 06:16 AM
Get Address of Active Cell LarryL Excel Discussion (Misc queries) 3 February 16th 07 10:02 PM
Getting active cell address bmwmcrider Excel Programming 5 October 8th 03 03:23 PM
How to get the active cell address? d Excel Programming 1 August 25th 03 04:34 PM


All times are GMT +1. The time now is 07:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"