Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I program a macro to read the contents of a cell:
- letters - numbers The last row in my spreadsheet has a value of 99999. Need to loop until the cell value = 99999 - how do i do this? While looping I need to take action only if a certain letter is encountered in a cell - if the letter is "J" I need to run another macro. Is anyone able to help? Please & Thanks!! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Needin',
Sub test() Dim i As Long i = 0 With Sheet1.Cells(1, 1) Do Until .Offset(i, 0).Value = "99999" If .Offset(i, 0).Value Like "J*" Then Debug.Print "J Something" ElseIf .Offset(i, 0).Value Like "K*" Then Debug.Print "K Something" Else Debug.Print "Something Else" End If i = i + 1 Loop End With End Sub Rob "needin' help" wrote in message ... How do I program a macro to read the contents of a cell: - letters - numbers The last row in my spreadsheet has a value of 99999. Need to loop until the cell value = 99999 - how do i do this? While looping I need to take action only if a certain letter is encountered in a cell - if the letter is "J" I need to run another macro. Is anyone able to help? Please & Thanks!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to transfer contents of 'Selected' cell to alternate cell. | Excel Worksheet Functions | |||
Reading contents | Excel Discussion (Misc queries) | |||
Macro that looks at cell contents | Excel Discussion (Misc queries) | |||
Macro to remove contents of cell and move all other contents up one row | Excel Discussion (Misc queries) | |||
Browsing to URL and reading contents | Excel Programming |