PC Review


Reply
Thread Tools Rate Thread

Column D x 2

 
 
TGalin
Guest
Posts: n/a
 
      18th May 2009
Column D has numbers in random cells. Is there a code that will look through
the cells in Column D for numbers and when it finds them multiply them by 2?
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      18th May 2009
Sub multiplyby()
x = InputBox("multiple value ie: 2")
On Error Resume Next
For Each c In Columns("D").SpecialCells(xlCellTypeConstants, 23)
'If IsNumeric(c) Then c.Value = c * x
c.Value = c * x
Next c
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"TGalin" <(E-Mail Removed)> wrote in message
news:EF70659F-F02D-49B8-9B21-(E-Mail Removed)...
> Column D has numbers in random cells. Is there a code that will look
> through
> the cells in Column D for numbers and when it finds them multiply them by
> 2?


 
Reply With Quote
 
TGalin
Guest
Posts: n/a
 
      19th May 2009
Thank you for your help. I'm not sure how to use this.

"Don Guillett" wrote:

> Sub multiplyby()
> x = InputBox("multiple value ie: 2")
> On Error Resume Next
> For Each c In Columns("D").SpecialCells(xlCellTypeConstants, 23)
> 'If IsNumeric(c) Then c.Value = c * x
> c.Value = c * x
> Next c
> End Sub
>
>
> --
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
> (E-Mail Removed)
> "TGalin" <(E-Mail Removed)> wrote in message
> news:EF70659F-F02D-49B8-9B21-(E-Mail Removed)...
> > Column D has numbers in random cells. Is there a code that will look
> > through
> > the cells in Column D for numbers and when it finds them multiply them by
> > 2?

>
>

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      19th May 2009

Just copy/paste into a macro module and execute from there. Make sure your
sheet is the active sheet at the time.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"TGalin" <(E-Mail Removed)> wrote in message
news:3B2DAF58-5FCD-4AC5-8945-(E-Mail Removed)...
> Thank you for your help. I'm not sure how to use this.
>
> "Don Guillett" wrote:
>
>> Sub multiplyby()
>> x = InputBox("multiple value ie: 2")
>> On Error Resume Next
>> For Each c In Columns("D").SpecialCells(xlCellTypeConstants, 23)
>> 'If IsNumeric(c) Then c.Value = c * x
>> c.Value = c * x
>> Next c
>> End Sub
>>
>>
>> --
>> Don Guillett
>> Microsoft MVP Excel
>> SalesAid Software
>> (E-Mail Removed)
>> "TGalin" <(E-Mail Removed)> wrote in message
>> news:EF70659F-F02D-49B8-9B21-(E-Mail Removed)...
>> > Column D has numbers in random cells. Is there a code that will look
>> > through
>> > the cells in Column D for numbers and when it finds them multiply them
>> > by
>> > 2?

>>
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendar Spreadsheet: Column 1 = Date, Column 2 Time of Day, Column 3 memo text field JDJ Microsoft Excel Discussion 0 24th May 2007 01:14 AM
Search for a column based on the column header and then past data from it to another column in another workbook minkokiss Microsoft Excel Programming 2 5th Apr 2007 01:12 AM
Based on a condition in one column, search for a year in another column, and display data from another column in the same row >> look MPSingley@midamerican.com Microsoft Excel Programming 2 30th Dec 2006 06:23 PM
Based on a condition in one column, search for a year in another column, and display data from another column in the same row >> look MPSingley@midamerican.com Microsoft Excel Misc 0 27th Dec 2006 04:31 PM
How can i have all alike product codes in column A be matched with like cities in column B and then add the totals that are in column C genesisoxygen@gmail.com Microsoft Excel Programming 4 2nd Aug 2006 01:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:39 AM.