Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formula question from beginner | Excel Discussion (Misc queries) | |||
Excel Question from a beginner | Excel Discussion (Misc queries) | |||
Beginner Question | Charts and Charting in Excel | |||
Beginner question! | Excel Discussion (Misc queries) | |||
Beginner question | Excel Discussion (Misc queries) |