Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hope someone can help with this question: I have a range of cells between A10:B16. Based on the information in B10 to B16 (ie in column B) I want a macr to take the values and drop them into cells A4 to A9 respectively For example: If b10 does not contain "(A1)" then the value of B10 i dumped into A5. If B11 does not contain "(A1)" then the value of B1 is dumped into A6 etc. Is this possible using a loop of some sort ? Many thanks for your help. Scot -- scottwilson ----------------------------------------------------------------------- scottwilsonx's Profile: http://www.excelforum.com/member.php...fo&userid=1112 View this thread: http://www.excelforum.com/showthread.php?threadid=27774 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Scott,
Sub TryNow() Dim myCell As Range Dim i As Integer Range("A4:A9").ClearContents i = 1 For Each myCell In Range("B10:B16") If Not InStr(myCell.Value, "(A1)") 0 Then Range("A4")(i, 1).Value = myCell.Value i = i + 1 End If Next myCell End Sub HTH, Bernie MS Excel MVP "scottwilsonx" wrote in message ... Hope someone can help with this question: I have a range of cells between A10:B16. Based on the information in B10 to B16 (ie in column B) I want a macro to take the values and drop them into cells A4 to A9 respectively For example: If b10 does not contain "(A1)" then the value of B10 is dumped into A5. If B11 does not contain "(A1)" then the value of B11 is dumped into A6 etc. Is this possible using a loop of some sort ? Many thanks for your help. Scott -- scottwilsonx ------------------------------------------------------------------------ scottwilsonx's Profile: http://www.excelforum.com/member.php...o&userid=11128 View this thread: http://www.excelforum.com/showthread...hreadid=277742 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display contents of cell based on criteria | Excel Worksheet Functions | |||
Moving cells based on certain criteria | Excel Discussion (Misc queries) | |||
Finding cell contents based on certain criteria | Excel Discussion (Misc queries) | |||
Finding cell contents based on certain criteria | Excel Discussion (Misc queries) | |||
moving rows based on criteria | Excel Programming |