Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro To Move Cell Over


I have a long list of words in column A. I have to go thru them manuall
and put them into two catagories. Column B will be one category, colum
C the second.
I have been moving the cell contents manually but I wised up and I'
sure there is a macro.

I will be using the down arrow key to move my way down the list and a
I come across the words I would like to press a macro button (which
will create) to move the content into either column B or C.

I tried to record a macro moving the cell contents but it just move
them into the cell that was recorded. I need to move the cell directl
over in the same row.

Thanks again

--
brazen23
-----------------------------------------------------------------------
brazen234's Profile: http://www.excelforum.com/member.php...nfo&userid=995
View this thread: http://www.excelforum.com/showthread.php?threadid=49851

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Macro To Move Cell Over

Maybe something as simple as

Function MoveIt()
With Activecell
.Offset(0,1).Value = .Value
.Value = ""
End With
End Function

--

HTH

RP

(remove nothere from the email address if mailing direct)


"brazen234" wrote
in message ...

I have a long list of words in column A. I have to go thru them manually
and put them into two catagories. Column B will be one category, column
C the second.
I have been moving the cell contents manually but I wised up and I'm
sure there is a macro.

I will be using the down arrow key to move my way down the list and as
I come across the words I would like to press a macro button (which I
will create) to move the content into either column B or C.

I tried to record a macro moving the cell contents but it just moves
them into the cell that was recorded. I need to move the cell directly
over in the same row.

Thanks again!


--
brazen234
------------------------------------------------------------------------
brazen234's Profile:

http://www.excelforum.com/member.php...fo&userid=9952
View this thread: http://www.excelforum.com/showthread...hreadid=498514



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Macro To Move Cell Over

What is the logic to know whether the cell should be moved to Column B or C?
--
HTH...

Jim Thomlinson


"brazen234" wrote:


I have a long list of words in column A. I have to go thru them manually
and put them into two catagories. Column B will be one category, column
C the second.
I have been moving the cell contents manually but I wised up and I'm
sure there is a macro.

I will be using the down arrow key to move my way down the list and as
I come across the words I would like to press a macro button (which I
will create) to move the content into either column B or C.

I tried to record a macro moving the cell contents but it just moves
them into the cell that was recorded. I need to move the cell directly
over in the same row.

Thanks again!


--
brazen234
------------------------------------------------------------------------
brazen234's Profile: http://www.excelforum.com/member.php...fo&userid=9952
View this thread: http://www.excelforum.com/showthread...hreadid=498514


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro To Move Cell Over


Bob-
I'm not sure how I would go about using that function. And how would it
differentiate between column B or C ?

Jim-
Basically nouns vs adjectives. Most of it is product nouns (guitars,
houses, furniture, etc..).


--
brazen234
------------------------------------------------------------------------
brazen234's Profile: http://www.excelforum.com/member.php...fo&userid=9952
View this thread: http://www.excelforum.com/showthread...hreadid=498514

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Macro To Move Cell Over

Do you have a list of the Nouns and one of the Adjectives. If so This will be
not too bad to automate... Otherwise it could be a bit tricky...
--
HTH...

Jim Thomlinson


"brazen234" wrote:


I have a long list of words in column A. I have to go thru them manually
and put them into two catagories. Column B will be one category, column
C the second.
I have been moving the cell contents manually but I wised up and I'm
sure there is a macro.

I will be using the down arrow key to move my way down the list and as
I come across the words I would like to press a macro button (which I
will create) to move the content into either column B or C.

I tried to record a macro moving the cell contents but it just moves
them into the cell that was recorded. I need to move the cell directly
over in the same row.

Thanks again!


--
brazen234
------------------------------------------------------------------------
brazen234's Profile: http://www.excelforum.com/member.php...fo&userid=9952
View this thread: http://www.excelforum.com/showthread...hreadid=498514




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Macro To Move Cell Over

It wouldn't. As you gave no idea how to differentiate, I couldn't even begin
to guess. What I gave you is a macro that you can incorporate in your
wrapper code.

Or you could make it a sub, and just go down, select the first item to move,
and run it. Then got to the next one, and F4. This includes going to column
B if you want to shift it one more.

Not ideal, but a darn sight faster than manually moving it, and you can get
quite slick at it after a while. But give us the criteria for moving to B or
C and we will totally automate it.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"brazen234" wrote
in message ...

Bob-
I'm not sure how I would go about using that function. And how would it
differentiate between column B or C ?

Jim-
Basically nouns vs adjectives. Most of it is product nouns (guitars,
houses, furniture, etc..).


--
brazen234
------------------------------------------------------------------------
brazen234's Profile:

http://www.excelforum.com/member.php...fo&userid=9952
View this thread: http://www.excelforum.com/showthread...hreadid=498514



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Macro To Move Cell Over

Brazen,
How about this?
Save this function in your personal.xls, create a button to trigger it
( like you said in your first post)
and you've got it!

Function MoveIt()
intAnswer = InputBox("Move over how many cells, 1 or 2?")
With ActiveCell
.Offset(0, intAnswer).Value = .Value
.Value = ""
End With
End Function

Of course, by now, you could have done the whole list by hand!!! ; )
Alan

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro To Move Cell Over


Bob-
Just to clarify, my brain will be doing the differentiating. Didn't
mean to make it sound like I wanted the macro/function to do it. So
there is no criteria besides really me deciding what word I want in
column B or C. I don't know what a wrapper code is but I can look it
up. Thank you for your help.

Jim-
There are no seperate lists of the words. I'm creating a list of
premium nouns (like products and services) for a domain registration
project. So I do need to actually go thru each word anyhow.

alan-
Thanks for your contribution. I'm not as familiar with functions as
macros but I will try and to do what you suggest. The list is several
thousand words so maybe I'd be done in a month by hand ! :)


--
brazen234
------------------------------------------------------------------------
brazen234's Profile: http://www.excelforum.com/member.php...fo&userid=9952
View this thread: http://www.excelforum.com/showthread...hreadid=498514

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro To Move Cell Over


I'm still lost ! How do I use those functions ? I've pasted them into
the VBE and now what ?
Anyhow I wanted to maybe clarify what I want done.

In simplest from I want to create a macro that will:

Move a cell one cell to the right
OR
Move a cell two cells to the right


Maybe that explanation helps more ?


--
brazen234
------------------------------------------------------------------------
brazen234's Profile: http://www.excelforum.com/member.php...fo&userid=9952
View this thread: http://www.excelforum.com/showthread...hreadid=498514

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro To Move Cell Over


brazen234 Wrote:
I'm still lost ! How do I use those functions ? I've pasted them int
the VBE and now what ?
Anyhow I wanted to maybe clarify what I want done.

In simplest from I want to create a macro that will:

Move a cell one cell to the right
OR
Move a cell two cells to the right

Maybe that explanation helps more ?Hi brazen,

Adding to Alen's excelent post, you can use it
this way to move one or more cells at a time.
Just first select the cells you want to move.
---------------
Sub MoveIt()
Dim intAnswer
intAnswer = InputBox("Move over how many cells, 1 or 2?")
With Selection
.Offset(0, intAnswer).Value = .Value
.Value = ""
End With
End Su

--
Desert Piranh

-----------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...fo&userid=2893
View this thread: http://www.excelforum.com/showthread.php?threadid=49851



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Macro To Move Cell Over

brazen,
You know how to get a custom button to run the macro, right? You need
to assign the macro to the button. You should use the version that
Piranha posted since a "Sub" will be visible in the Assign Macro box
and a "Function" won't....sorry I forgot about that.
Alan

  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Macro To Move Cell Over

Without criteria, there is no point in wrapper code.

Go to the VBIDE (Alt-F11)
Insert a module (InsertModule)
Copy this code into the module

SubMoveIt()
With Activecell
.Offset(0,1).Value = .Value
.Value = ""
End With
End Function

Close the VBIDE and go back to Excl
Select the fisrt cell to be moved
Go To ToolsMacroMacros...
Select MoveIt from the list and Run
Then move to the next cell to move and hit the F4 key
Repeat as required

Not that the next cell could be the one it was just moved to if you want to
move it further

--

HTH

RP
(remove nothere from the email address if mailing direct)


"brazen234" wrote
in message ...

Bob-
Just to clarify, my brain will be doing the differentiating. Didn't
mean to make it sound like I wanted the macro/function to do it. So
there is no criteria besides really me deciding what word I want in
column B or C. I don't know what a wrapper code is but I can look it
up. Thank you for your help.

Jim-
There are no seperate lists of the words. I'm creating a list of
premium nouns (like products and services) for a domain registration
project. So I do need to actually go thru each word anyhow.

alan-
Thanks for your contribution. I'm not as familiar with functions as
macros but I will try and to do what you suggest. The list is several
thousand words so maybe I'd be done in a month by hand ! :)


--
brazen234
------------------------------------------------------------------------
brazen234's Profile:

http://www.excelforum.com/member.php...fo&userid=9952
View this thread: http://www.excelforum.com/showthread...hreadid=498514



  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro To Move Cell Over


Bob Phillips Wrote:
Without criteria, there is no point in wrapper code.

Go to the VBIDE (Alt-F11)
Insert a module (InsertModule)
Copy this code into the module

SubMoveIt()
With Activecell
.Offset(0,1).Value = .Value
.Value = ""
End With
End Function

Close the VBIDE and go back to Excl
Select the fisrt cell to be moved
Go To ToolsMacroMacros...
Select MoveIt from the list and Run
Then move to the next cell to move and hit the F4 key
Repeat as required

Not that the next cell could be the one it was just moved to if you
want to
move it further



Excellent! Works like a dream! Thank you for walking me thru that. You
know what I think happened, your first post had "Function MoveIt()"
instead of "Sub MoveIt()". I could not make it appear in the macros
(what I'm much more used to) and I could not get it to work as a
function.


--
brazen234
------------------------------------------------------------------------
brazen234's Profile: http://www.excelforum.com/member.php...fo&userid=9952
View this thread: http://www.excelforum.com/showthread...hreadid=498514

  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Macro To Move Cell Over

As I said

.... What I gave you is a macro that you can incorporate in your
wrapper code.

Or you could make it a sub, and just go ....

--

HTH

RP
(remove nothere from the email address if mailing direct)


"brazen234" wrote
in message ...

Bob Phillips Wrote:
Without criteria, there is no point in wrapper code.

Go to the VBIDE (Alt-F11)
Insert a module (InsertModule)
Copy this code into the module

SubMoveIt()
With Activecell
.Offset(0,1).Value = .Value
.Value = ""
End With
End Function

Close the VBIDE and go back to Excl
Select the fisrt cell to be moved
Go To ToolsMacroMacros...
Select MoveIt from the list and Run
Then move to the next cell to move and hit the F4 key
Repeat as required

Not that the next cell could be the one it was just moved to if you
want to
move it further



Excellent! Works like a dream! Thank you for walking me thru that. You
know what I think happened, your first post had "Function MoveIt()"
instead of "Sub MoveIt()". I could not make it appear in the macros
(what I'm much more used to) and I could not get it to work as a
function.


--
brazen234
------------------------------------------------------------------------
brazen234's Profile:

http://www.excelforum.com/member.php...fo&userid=9952
View this thread: http://www.excelforum.com/showthread...hreadid=498514



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to move to another cell Frappier New Users to Excel 8 November 11th 08 02:06 PM
Macro to move one cell down tjb Excel Worksheet Functions 13 April 22nd 08 09:52 PM
macro to move part of cell contents to another cell icetoad hisself Excel Discussion (Misc queries) 4 November 27th 06 07:19 PM
Macro to move the cursor to a different cell on the same row Ann Wong Excel Programming 4 August 31st 04 01:59 AM
Macro to move to next cell Neil[_12_] Excel Programming 2 August 2nd 03 09:45 PM


All times are GMT +1. The time now is 03:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"