Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try the below macro
Sub Macro() Dim varFound As Variant Set varFound = Columns(ActiveCell.Column).Find("Stop") If Not varfound Is Nothing Then varfound.Offset(-1, 0).Activate End Sub The above macro was posted by Jacob Skaria -- my active cell is the cell above the word stop for that column. I have been messing round, but I keep running endless issues. What I now need is from that active cell, I need to go to Column B:B, go up and find the word "Reserve" go down 3 cells (Column B), copy that value go back to the active cell above the word "Stop" go down 2 cells and paste that value only into that cell and finally go one cell above the cell which has the word stop. One more catch if the word reserve is not there, than do nothing. In my example Say if the word stop is columns CY772, I need to go to B753 copy the values from B756 go back to CY773 and end up at CY771 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Again
Modified the macro which returns the value of (3 cells down to Reserve) in Column B to (one cell down to Stop)...Try and feedback Sub Macro() Dim varFound As Variant Set varFound = Range(ActiveCell, Cells(Rows.Count, _ ActiveCell.Column).End(xlUp)).Find("Stop") If Not varFound Is Nothing Then varFound.Offset(-1, 0).Activate Set varFound = Range("B" & ActiveCell.Row & ":B1").Find(What:="Reserve", _ SearchDirection:=xlPrevious) If Not varFound Is Nothing Then ActiveCell.Offset(2) = varFound.Offset(3).Value End If End If End Sub If this post helps click Yes --------------- Jacob Skaria "RGreen" wrote: Try the below macro Sub Macro() Dim varFound As Variant Set varFound = Columns(ActiveCell.Column).Find("Stop") If Not varfound Is Nothing Then varfound.Offset(-1, 0).Activate End Sub The above macro was posted by Jacob Skaria -- my active cell is the cell above the word stop for that column. I have been messing round, but I keep running endless issues. What I now need is from that active cell, I need to go to Column B:B, go up and find the word "Reserve" go down 3 cells (Column B), copy that value go back to the active cell above the word "Stop" go down 2 cells and paste that value only into that cell and finally go one cell above the cell which has the word stop. One more catch if the word reserve is not there, than do nothing. In my example Say if the word stop is columns CY772, I need to go to B753 copy the values from B756 go back to CY773 and end up at CY771 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Ping Jacob Skaria | Excel Worksheet Functions | |||
Jacob & Co. Other Prices | Charts and Charting in Excel | |||
VBA Question - Bernie Deitrick helped me previously | Excel Discussion (Misc queries) | |||
I have clairified some info., maybe, I can be helped now ......... | Excel Worksheet Functions | |||
Thanks Jon for your Jan 2001 post......it helped me today! | Charts and Charting in Excel |