Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Select multiple adjacent cells of multiple cells without selecting adjacent
cells one by one. those cells looks like; |Column A1 |Column A2| |random characters | A | |sjsjsjsjskkskskskk | B | |wtwuwuwuuusisis | A | |wuuuuusiwuwuwiu| A | |euuuuuuuuuuuuuuu| B | I am trying to select A1 cells that's adjacent of A2 cells without selecting A1 cells one by one. Thank you for your help. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am trying to select A1 cells that's adjacent of "B" cells without selecting
A1 cells one by one I am trying to select A1 cells that's adjacent of A2 cells without selecting A1 cells one by one. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You need to do a little research into Excel cell referencing with regard to
rows and columns. A1 and A2 are cells in Column A, not separate columns. Gord Dibben MS Excel MVP On Fri, 18 Dec 2009 16:21:01 -0800, sjsjsjsjsjs wrote: Select multiple adjacent cells of multiple cells without selecting adjacent cells one by one. those cells looks like; |Column A1 |Column A2| |random characters | A | |sjsjsjsjskkskskskk | B | |wtwuwuwuuusisis | A | |wuuuuusiwuwuwiu| A | |euuuuuuuuuuuuuuu| B | I am trying to select A1 cells that's adjacent of A2 cells without selecting A1 cells one by one. Thank you for your help. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
those cells looks like;
|Column A |Column B| |random characters | Y | |sjsjsjsjskkskskskk | Z | |wtwuwuwuuusisis | Y | |wuuuuusiwuwuwiu| Y | |euuuuuuuuuuuuuuu| Z | .. .. .. .. continue... I am trying to select A cells that's adjacent of Y cells without selecting A cells one by one, then copy selected cells to Column C, and keep rows of selected cells. those cells will look like; |Column C | |random characters | | | |wtwuwuwuuusisis | |wuuuuusiwuwuwiu| | | .. .. .. .. continue... Thank you for your help. those cells looks like; |Column A1 |Column A2| |random characters | A | |sjsjsjsjskkskskskk | B | |wtwuwuwuuusisis | A | |wuuuuusiwuwuwiu| A | |euuuuuuuuuuuuuuu| B | I am trying to select A1 cells that's adjacent of A2 cells without selecting A1 cells one by one. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
This macro should do what you want...
Sub MoveColAToColCFilterOnColB() Dim X As Long, LastRow As Long, Answer As String Answer = InputBox("What Column B character(s) do you want to filter on?") If Len(Answer) 0 Then LastRow = Cells(Rows.Count, "B").End(xlUp).Row For X = 1 To LastRow If StrComp(Cells(X, "B").Value, Answer, vbTextCompare) = 0 Then Cells(X, "B").Offset(, 1).Value = Cells(X, "B").Offset(, -1).Value End If Next End If End Sub The code will ask you what text in Column B to search on and then perform its copy operation. -- Rick (MVP - Excel) "sjsjsjsjsjsjs" wrote in message ... those cells looks like; |Column A |Column B| |random characters | Y | |sjsjsjsjskkskskskk | Z | |wtwuwuwuuusisis | Y | |wuuuuusiwuwuwiu| Y | |euuuuuuuuuuuuuuu| Z | . . . . continue... I am trying to select A cells that's adjacent of Y cells without selecting A cells one by one, then copy selected cells to Column C, and keep rows of selected cells. those cells will look like; |Column C | |random characters | | | |wtwuwuwuuusisis | |wuuuuusiwuwuwiu| | | . . . . continue... Thank you for your help. those cells looks like; |Column A1 |Column A2| |random characters | A | |sjsjsjsjskkskskskk | B | |wtwuwuwuuusisis | A | |wuuuuusiwuwuwiu| A | |euuuuuuuuuuuuuuu| B | I am trying to select A1 cells that's adjacent of A2 cells without selecting A1 cells one by one. |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Another way you could approach this is to use formulas in your Column C
cells. Assuming you will want to "filter" on different text every now and then, put the text string you want to look for in Column B in cell D1 (that is, put the letter Y in D1) and put this formula in C1 and copy it down as far as you like... =IF(B1=$D$1,A1,"") -- Rick (MVP - Excel) "Rick Rothstein" wrote in message ... This macro should do what you want... Sub MoveColAToColCFilterOnColB() Dim X As Long, LastRow As Long, Answer As String Answer = InputBox("What Column B character(s) do you want to filter on?") If Len(Answer) 0 Then LastRow = Cells(Rows.Count, "B").End(xlUp).Row For X = 1 To LastRow If StrComp(Cells(X, "B").Value, Answer, vbTextCompare) = 0 Then Cells(X, "B").Offset(, 1).Value = Cells(X, "B").Offset(, -1).Value End If Next End If End Sub The code will ask you what text in Column B to search on and then perform its copy operation. -- Rick (MVP - Excel) "sjsjsjsjsjsjs" wrote in message ... those cells looks like; |Column A |Column B| |random characters | Y | |sjsjsjsjskkskskskk | Z | |wtwuwuwuuusisis | Y | |wuuuuusiwuwuwiu| Y | |euuuuuuuuuuuuuuu| Z | . . . . continue... I am trying to select A cells that's adjacent of Y cells without selecting A cells one by one, then copy selected cells to Column C, and keep rows of selected cells. those cells will look like; |Column C | |random characters | | | |wtwuwuwuuusisis | |wuuuuusiwuwuwiu| | | . . . . continue... Thank you for your help. those cells looks like; |Column A1 |Column A2| |random characters | A | |sjsjsjsjskkskskskk | B | |wtwuwuwuuusisis | A | |wuuuuusiwuwuwiu| A | |euuuuuuuuuuuuuuu| B | I am trying to select A1 cells that's adjacent of A2 cells without selecting A1 cells one by one. |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thank you for your help.
Macro really worked. re you working for Microsoft or have ou ever worked for Microsoft? Did Microsoft ever publis A Super Input Routine? my search in microsoft websites doesn't show any of information about book. Thank you for your help. "Rick Rothstein" wrote: "Rick Rothstein" wrote in message ... This macro should do what you want... Sub MoveColAToColCFilterOnColB() Dim X As Long, LastRow As Long, Answer As String Answer = InputBox("What Column B character(s) do you want to filter on?") If Len(Answer) 0 Then LastRow = Cells(Rows.Count, "B").End(xlUp).Row For X = 1 To LastRow If StrComp(Cells(X, "B").Value, Answer, vbTextCompare) = 0 Then Cells(X, "B").Offset(, 1).Value = Cells(X, "B").Offset(, -1).Value End If Next End If End Sub The code will ask you what text in Column B to search on and then perform its copy operation. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select multiple adjacent cells of multiple cells without selecting | New Users to Excel | |||
Selecting multiple cells, I can't see the cells highlighted | Excel Discussion (Misc queries) | |||
How to change shade of cells when selecting multiple cells | Excel Discussion (Misc queries) | |||
Countif across multiple non-adjacent cells | Excel Discussion (Misc queries) | |||
By selecting cells adjacent to cells tally sheet | Excel Worksheet Functions |