Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default How to use macro to edit data in Excel cells

I use macros by recording, not familiar with Visual Basics. I want to edit
the cell content of similar cells . When I run the macro on other cells it
takes the information from the very first cell and keeps repeating the info
on the first cell. What is wrong?
Is there any Excel short cut like Lotus 123, macro "?" to represent to "hold
and fill" while the macro is running.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default How to use macro to edit data in Excel cells

Post your macro!
Stefi


€˛Annamalai€¯ ezt Ć*rta:

I use macros by recording, not familiar with Visual Basics. I want to edit
the cell content of similar cells . When I run the macro on other cells it
takes the information from the very first cell and keeps repeating the info
on the first cell. What is wrong?
Is there any Excel short cut like Lotus 123, macro "?" to represent to "hold
and fill" while the macro is running.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 903
Default How to use macro to edit data in Excel cells

Not familiar with Lotus 1-2-3 but if "hold and fill" is like using the
fill handle then see
http://www.mvps.org/dmcritchie/excel/fillhand.htm-

---
HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Stefi" wrote in message ...
Post your macro!
Stefi


"Annamalai" ezt ķrta:

I use macros by recording, not familiar with Visual Basics. I want to edit
the cell content of similar cells . When I run the macro on other cells it
takes the information from the very first cell and keeps repeating the info
on the first cell. What is wrong?
Is there any Excel short cut like Lotus 123, macro "?" to represent to "hold
and fill" while the macro is running.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default How to use macro to edit data in Excel cells

Aim: Data from SAP is in label form like 11.06.06 and I would like to convert
them to data to berecognized by Excel in date format.

The macro recorded is:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 9/19/2006 by Annamalai
'
' Keyboard Shortcut: Ctrl+z
'
ActiveCell.FormulaR1C1 = "11-Sep-2006"
Range("F10").Select
End Sub

Data used:
11-Sep-06
11-Sep-06
22.05.06
11-Sep-06
Top cell was manually edited and macro recorded. Bottom 2&4 were the result
after macro use(first cell repeats). Cell 3, is raw data, waiting conversion.

Annamalai
xxxxxxxxxxxxxxxxxxxxx

"Stefi" wrote:

Post your macro!
Stefi


€˛Annamalai€¯ ezt Ć*rta:

I use macros by recording, not familiar with Visual Basics. I want to edit
the cell content of similar cells . When I run the macro on other cells it
takes the information from the very first cell and keeps repeating the info
on the first cell. What is wrong?
Is there any Excel short cut like Lotus 123, macro "?" to represent to "hold
and fill" while the macro is running.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default How to use macro to edit data in Excel cells

Hi Annamalai,

From your examples I supposed that you have UK English language setting (in
Windows Regional settings). Post if it's not true! Customize it by setting
date separator to "." (fullstop). Then you can use this macro. Select ALL
cells (say a column) you want to convert, then run the macro!

Sub DateConv()
For Each cell In Selection
Selection.ColumnWidth = 11
If cell.Value = "" Then Exit For
x = cell.Value
cell.NumberFormat = "dd-mmm-yyyy"
cell.Value = DateValue(x)
Next cell
End Sub


Regards,
Stefi

€˛€¯ ezt Ć*rta:

Aim: Data from SAP is in label form like 11.06.06 and I would like to convert
them to data to berecognized by Excel in date format.

The macro recorded is:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 9/19/2006 by Annamalai
'
' Keyboard Shortcut: Ctrl+z
'
ActiveCell.FormulaR1C1 = "11-Sep-2006"
Range("F10").Select
End Sub

Data used:
11-Sep-06
11-Sep-06
22.05.06
11-Sep-06
Top cell was manually edited and macro recorded. Bottom 2&4 were the result
after macro use(first cell repeats). Cell 3, is raw data, waiting conversion.

Annamalai
xxxxxxxxxxxxxxxxxxxxx

"Stefi" wrote:

Post your macro!
Stefi


€˛Annamalai€¯ ezt Ć*rta:

I use macros by recording, not familiar with Visual Basics. I want to edit
the cell content of similar cells . When I run the macro on other cells it
takes the information from the very first cell and keeps repeating the info
on the first cell. What is wrong?
Is there any Excel short cut like Lotus 123, macro "?" to represent to "hold
and fill" while the macro is running.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default How to use macro to edit data in Excel cells



"Stefi" wrote:

Hi Annamalai,

From your examples I supposed that you have UK English language setting (in
Windows Regional settings). Post if it's not true! Customize it by setting
date separator to "." (fullstop). Then you can use this macro. Select ALL
cells (say a column) you want to convert, then run the macro!

Sub DateConv()
For Each cell In Selection
Selection.ColumnWidth = 11
If cell.Value = "" Then Exit For
x = cell.Value
cell.NumberFormat = "dd-mmm-yyyy"
cell.Value = DateValue(x)
Next cell
End Sub


Regards,
Stefi

€˛€¯ ezt Ć*rta:

Aim: Data from SAP is in label form like 11.06.06 and I would like to convert
them to data to berecognized by Excel in date format.

The macro recorded is:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 9/19/2006 by Annamalai
'
' Keyboard Shortcut: Ctrl+z
'
ActiveCell.FormulaR1C1 = "11-Sep-2006"
Range("F10").Select
End Sub

Data used:
11-Sep-06
11-Sep-06
22.05.06
11-Sep-06
Top cell was manually edited and macro recorded. Bottom 2&4 were the result
after macro use(first cell repeats). Cell 3, is raw data, waiting conversion.

Annamalai
xxxxxxxxxxxxxxxxxxxxx

"Stefi" wrote:

Post your macro!
Stefi


€˛Annamalai€¯ ezt Ć*rta:

I use macros by recording, not familiar with Visual Basics. I want to edit
the cell content of similar cells . When I run the macro on other cells it
takes the information from the very first cell and keeps repeating the info
on the first cell. What is wrong?
Is there any Excel short cut like Lotus 123, macro "?" to represent to "hold
and fill" while the macro is running.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default How to use macro to edit data in Excel cells

Thanks for your reply.
I have U.S. (English) for dictionary in my computer. In India, the popular
date format is dd.mm.yyyy.
I tried to use your macro but did not succeed.
I will check again and come to you.
Annamalai
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

"Stefi" wrote:

Hi Annamalai,

From your examples I supposed that you have UK English language setting (in
Windows Regional settings). Post if it's not true! Customize it by setting
date separator to "." (fullstop). Then you can use this macro. Select ALL
cells (say a column) you want to convert, then run the macro!

Sub DateConv()
For Each cell In Selection
Selection.ColumnWidth = 11
If cell.Value = "" Then Exit For
x = cell.Value
cell.NumberFormat = "dd-mmm-yyyy"
cell.Value = DateValue(x)
Next cell
End Sub


Regards,
Stefi

€˛€¯ ezt Ć*rta:

Aim: Data from SAP is in label form like 11.06.06 and I would like to convert
them to data to berecognized by Excel in date format.

The macro recorded is:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 9/19/2006 by Annamalai
'
' Keyboard Shortcut: Ctrl+z
'
ActiveCell.FormulaR1C1 = "11-Sep-2006"
Range("F10").Select
End Sub

Data used:
11-Sep-06
11-Sep-06
22.05.06
11-Sep-06
Top cell was manually edited and macro recorded. Bottom 2&4 were the result
after macro use(first cell repeats). Cell 3, is raw data, waiting conversion.

Annamalai
xxxxxxxxxxxxxxxxxxxxx

"Stefi" wrote:

Post your macro!
Stefi


€˛Annamalai€¯ ezt Ć*rta:

I use macros by recording, not familiar with Visual Basics. I want to edit
the cell content of similar cells . When I run the macro on other cells it
takes the information from the very first cell and keeps repeating the info
on the first cell. What is wrong?
Is there any Excel short cut like Lotus 123, macro "?" to represent to "hold
and fill" while the macro is running.

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default How to use macro to edit data in Excel cells

Does that mean that 11.06.06 in your example is a UK/India style date meaning
11th of June, 2006?
Or the problem is that it is a US style date meaning 6th of September, 2006?
One more question: How are cells containing these dates formatted? Text?
General?


Stefi


€˛Annamalai€¯ ezt Ć*rta:

Thanks for your reply.
I have U.S. (English) for dictionary in my computer. In India, the popular
date format is dd.mm.yyyy.
I tried to use your macro but did not succeed.
I will check again and come to you.
Annamalai
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

"Stefi" wrote:

Hi Annamalai,

From your examples I supposed that you have UK English language setting (in
Windows Regional settings). Post if it's not true! Customize it by setting
date separator to "." (fullstop). Then you can use this macro. Select ALL
cells (say a column) you want to convert, then run the macro!

Sub DateConv()
For Each cell In Selection
Selection.ColumnWidth = 11
If cell.Value = "" Then Exit For
x = cell.Value
cell.NumberFormat = "dd-mmm-yyyy"
cell.Value = DateValue(x)
Next cell
End Sub


Regards,
Stefi

€˛€¯ ezt Ć*rta:

Aim: Data from SAP is in label form like 11.06.06 and I would like to convert
them to data to berecognized by Excel in date format.

The macro recorded is:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 9/19/2006 by Annamalai
'
' Keyboard Shortcut: Ctrl+z
'
ActiveCell.FormulaR1C1 = "11-Sep-2006"
Range("F10").Select
End Sub

Data used:
11-Sep-06
11-Sep-06
22.05.06
11-Sep-06
Top cell was manually edited and macro recorded. Bottom 2&4 were the result
after macro use(first cell repeats). Cell 3, is raw data, waiting conversion.

Annamalai
xxxxxxxxxxxxxxxxxxxxx

"Stefi" wrote:

Post your macro!
Stefi


€˛Annamalai€¯ ezt Ć*rta:

I use macros by recording, not familiar with Visual Basics. I want to edit
the cell content of similar cells . When I run the macro on other cells it
takes the information from the very first cell and keeps repeating the info
on the first cell. What is wrong?
Is there any Excel short cut like Lotus 123, macro "?" to represent to "hold
and fill" while the macro is running.

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 unouwanme Excel Discussion (Misc queries) 9 August 31st 06 09:38 PM
Retrieve data from separate Excel session JessK Charts and Charting in Excel 2 March 27th 06 01:34 AM
From several workbooks onto one excel worksheet steve Excel Discussion (Misc queries) 6 December 1st 05 08:03 AM
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM
Macro to delete data in 'green' cells only Steve Excel Worksheet Functions 7 March 19th 05 01:40 PM


All times are GMT +1. The time now is 11:12 PM.

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"