Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a list of numbers which I am searching through, Once I find the one I'm looking for,( eg. in Cell A8), I need to return the value in the adjacent cell,( B8), increment the value in the cell by 1 and return the new value to the cell B8. I was using the lookup function to find the number I was seeking, however, once I get the relevant value and increment it I can't sent it back to the cell it originally came from... Anybody got any ideas??? Any help would be appreciated |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like this:
Sub test1() Dim anyvalue As Double Dim anyrange As Range Set anyrange = Range("A5:A500") anyvalue = 3 Increment anyvalue, anyrange End Sub Sub Increment(What As Double, Where As Range) Dim rFind As Range Set rFind = Where.Find(What) If Not rFind Is Nothing Then rFind.Offset(0, 1).Value = _ rFind.Offset(0, 1).Value + 1 End If End Sub Patrick Molloy Microsoft Excel MVP -----Original Message----- Hi, I have a list of numbers which I am searching through, Once I find the one I'm looking for,( eg. in Cell A8), I need to return the value in the adjacent cell,( B8), increment the value in the cell by 1 and return the new value to the cell B8. I was using the lookup function to find the number I was seeking, however, once I get the relevant value and increment it I can't sent it back to the cell it originally came from... Anybody got any ideas??? Any help would be appreciated . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Formulas can't send values to other cells.
You would need a macro to do this. -- Regards, Tom Ogilvy "Gerry" wrote in message ... Hi, I have a list of numbers which I am searching through, Once I find the one I'm looking for,( eg. in Cell A8), I need to return the value in the adjacent cell,( B8), increment the value in the cell by 1 and return the new value to the cell B8. I was using the lookup function to find the number I was seeking, however, once I get the relevant value and increment it I can't sent it back to the cell it originally came from... Anybody got any ideas??? Any help would be appreciated |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
referencing cells based on conditions in other cells | Excel Discussion (Misc queries) | |||
Referencing the same cells | Excel Discussion (Misc queries) | |||
Referencing several cells with IF? | Excel Worksheet Functions | |||
Referencing Cells | Excel Worksheet Functions | |||
Referencing other cells | Excel Discussion (Misc queries) |