Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Help with Editing VB (a really beginner question)

Hi,

Can anyone please help me to edit this code :

Selection.TextToColumns Destination:=Range("B31"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True,
OtherChar _
:="-", FieldInfo:=Array(Array(1, 1), Array(2, 1)),
TrailingMinusNumbers:=True
End Sub

so that I can run the macros for every cell selected?

and later, do every cell and then run the macros on other sheet in the
worksheet?

Thank you very much!

Nadhra
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Help with Editing VB (a really beginner question)


That code already runs on all selected cells, what is it you mean?, text
to coulmns is usually only performed once on a range.

nadhra;431216 Wrote:
Hi,

Can anyone please help me to edit this code :

Selection.TextToColumns Destination:=Range("B31"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True,
OtherChar _
:="-", FieldInfo:=Array(Array(1, 1), Array(2, 1)),
TrailingMinusNumbers:=True
End Sub

so that I can run the macros for every cell selected?

and later, do every cell and then run the macros on other sheet in the
worksheet?

Thank you very much!

Nadhra



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=119752

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Help with Editing VB (a really beginner question)

(further explanation)

I recorded that Macro when I was editing cell B31, now I want to run
the code for cell, G31 and X31 (for example).

How do I edit the Macro so that it can do so? (i.e I click 'Run Macro'
and vwallaaa, changed 'current cell condition' to 'wanted cell
condition'

Thank you so much!

On Jul 27, 3:30*pm, Simon Lloyd
wrote:
That code already runs on all selected cells, what is it you mean?, text
to coulmns is usually only performed once on a range.

nadhra;431216 Wrote:



Hi,


Can anyone please help me to edit this code :


Selection.TextToColumns Destination:=Range("B31"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True,
OtherChar _
:="-", FieldInfo:=Array(Array(1, 1), Array(2, 1)),
TrailingMinusNumbers:=True
End Sub


so that I can run the macros for every cell selected?


and later, do every cell and then run the macros on other sheet in the
worksheet?


Thank you very much!


Nadhra


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile:http://www.thecodecage.com/forumz/member.php?userid=1
View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=119752


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Help with Editing VB (a really beginner question)


That code will do that, where you see
Code:
--------------------
Selection.......whatever
--------------------
it means that that code will run on the selection, the only problem is
the destination cell so how about this:

Code:
--------------------
Sub Text_to_columns()
Dim IB as String
IB= Application.Inputbox("Enter your destination cell","Destination")
Selection.TextToColumns Destination:=Range(IB),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True,
OtherChar _
:="-", FieldInfo:=Array(Array(1, 1), Array(2, 1)),
TrailingMinusNumbers:=True
End Sub

--------------------


nadhra;431233 Wrote:
(further explanation)

I recorded that Macro when I was editing cell B31, now I want to run
the code for cell, G31 and X31 (for example).

How do I edit the Macro so that it can do so? (i.e I click 'Run Macro'
and vwallaaa, changed 'current cell condition' to 'wanted cell
condition'

Thank you so much!

On Jul 27, 3:30*pm, Simon Lloyd
wrote:
That code already runs on all selected cells, what is it you mean?,

text
to coulmns is usually only performed once on a range.

nadhra;431216 Wrote:



Hi,


Can anyone please help me to edit this code :


Selection.TextToColumns Destination:=Range("B31"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True,
OtherChar _
:="-", FieldInfo:=Array(Array(1, 1), Array(2, 1)),
TrailingMinusNumbers:=True
End Sub


so that I can run the macros for every cell selected?


and later, do every cell and then run the macros on other sheet in

the
worksheet?


Thank you very much!


Nadhra


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' ('The Code Cage - Microsoft Office Help - Microsoft

Office Discussion' (http://www.thecodecage.com))

------------------------------------------------------------------------
Simon Lloyd's Profile:'The Code Cage Forums - View Profile: Simon

Lloyd' (http://www.thecodecage.com/forumz/member.php?userid=1)
View this thread:'Help with Editing VB (a really beginner question) -

The Code Cage Forums'
(http://www.thecodecage.com/forumz/sh...d.php?t=119752)



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=119752

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
Formula question from beginner JPorter Excel Discussion (Misc queries) 3 May 2nd 08 06:41 PM
Excel Question from a beginner Blaine Davidson Excel Discussion (Misc queries) 2 June 12th 07 08:36 PM
Beginner Question Bernie Charts and Charting in Excel 0 February 13th 07 04:31 PM
Beginner question! Pat Excel Discussion (Misc queries) 3 August 7th 06 09:19 AM
Beginner question Tom. Excel Discussion (Misc queries) 1 April 24th 06 06:08 AM


All times are GMT +1. The time now is 06:58 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"