Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Say I have in the following cells
A1 134 A2 567 A3 368 I want C5 to show the remaining numbers from the list of 1,2,3,4,5,6,7,8,9 i.e. 2, 9 This required over approx 25 groups of cells in a sheet Anyone done this before? I am not good at VBA, but can manage most Excel functions happily Lorence |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Lorence,
Try: Sub Mytest() Dim L As String, TestST As String Dim X, Y TestST = "123456789" L = Range("A1").Text & Range("A2").Text & Range("A3").Text For X = 1 To 9 Y = 1 Do If Mid(L, X, 1) = Mid(TestST, Y, 1) Then _ TestST = Left(TestST, Y - 1) & Right(TestST, Len(TestST) - Y) Y = Y + 1 Loop Until Y Len(TestST) Next X Range("C5").Value = TestST End Sub Henry "Lorence" wrote in message ... Say I have in the following cells A1 134 A2 567 A3 368 I want C5 to show the remaining numbers from the list of 1,2,3,4,5,6,7,8,9 i.e. 2, 9 This required over approx 25 groups of cells in a sheet Anyone done this before? I am not good at VBA, but can manage most Excel functions happily Lorence |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Tue, 14 Jun 2005 00:35:56 GMT, "Henry"
wrote: Lorence, Try: Sub Mytest() Dim L As String, TestST As String Dim X, Y TestST = "123456789" L = Range("A1").Text & Range("A2").Text & Range("A3").Text For X = 1 To 9 Y = 1 Do If Mid(L, X, 1) = Mid(TestST, Y, 1) Then _ TestST = Left(TestST, Y - 1) & Right(TestST, Len(TestST) - Y) Y = Y + 1 Loop Until Y Len(TestST) Next X Range("C5").Value = TestST End Sub Henry Works brilliantly - thks Lorence |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I extract a list of numbers missing in a list? | New Users to Excel | |||
add multiple numbers in one cell with those numbers remaining visi | Excel Worksheet Functions | |||
change a vertical list of numbers to horizontal list from 1 cell | Excel Discussion (Misc queries) | |||
how to extract unique numbers once from a list of repeated numbers? | Excel Discussion (Misc queries) | |||
One Selection From Drop Down List Limits Remaining Selections | Excel Discussion (Misc queries) |