ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Find all cells with a number and mulitply (https://www.excelbanter.com/excel-discussion-misc-queries/4369-find-all-cells-number-mulitply.html)

Jim

Find all cells with a number and mulitply
 
How can I find all cells in a sheet that are a number
greater than zero and multiply each one by a number?
IE: the number to multiply by is 1.2
A1 Tom
A2 25
A3 0
G12 Bob
G13 25

I want to programatically (without using a macro) find
cells a2 and g13 only and multiply them by 1.2

Thanks in advance for your help.
Jim

Bob Phillips

Jim,

As long as you don't have any negative numbers, it doesn't matter about
being 0 (0*n=0) or being text.

Try this

Put 1.2 in a spare cell and then copy it
Select all the cells
Goto menu EditPastespecial
Click the Multiply option
OK out

Now clear the cell with 1.l2 in

--

HTH

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


"Jim" wrote in message
...
How can I find all cells in a sheet that are a number
greater than zero and multiply each one by a number?
IE: the number to multiply by is 1.2
A1 Tom
A2 25
A3 0
G12 Bob
G13 25

I want to programatically (without using a macro) find
cells a2 and g13 only and multiply them by 1.2

Thanks in advance for your help.
Jim




Domenic

Try the following array formula...

=SUM(IF(ISNUMBER(A1:G13),A1:G13*1.2))

....confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!

In article ,
"Jim" wrote:

How can I find all cells in a sheet that are a number
greater than zero and multiply each one by a number?
IE: the number to multiply by is 1.2
A1 Tom
A2 25
A3 0
G12 Bob
G13 25

I want to programatically (without using a macro) find
cells a2 and g13 only and multiply them by 1.2

Thanks in advance for your help.
Jim


Jason Morin

While you can multiply your text values by 1.2 and
nothing will happen, if you really want to just select
numerical values:

1. Key 1.2 into an open cell.
2. Copy that cell.
3. Press Ctrl+A.
4. Press F5 Special click "Constants" and uncheck
everything below except "Numbers".
5. Edit Paste Special and click "Multiply".

HTH
Jason
Atlanta, GA

-----Original Message-----
How can I find all cells in a sheet that are a number
greater than zero and multiply each one by a number?
IE: the number to multiply by is 1.2
A1 Tom
A2 25
A3 0
G12 Bob
G13 25

I want to programatically (without using a macro) find
cells a2 and g13 only and multiply them by 1.2

Thanks in advance for your help.
Jim
.



All times are GMT +1. The time now is 09:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com