Divide Selected Cell By 100

Dec 16, 2009

I'm lost on VBA, but I have been successful at recording a few extremely simple macros. I have a number of pdf statements that I have run through OCR, and the OCR often misses the decimal point so that 43.85 comes out as 4385. (this is in dollars, so everything has 2 decimals).

These cells are usually pretty easy to spot, so I want to select that cell, press a keystroke or 2, and divide the value in that cell by 100. I assumed that by selecting "relative cell references", and recording a macro with the keystrokes "<F2>/100<HOME>=" (without the quotes, of course), I would accomplish that. But instead, it places a constant in that cell, with the value obtained in the cell where I recorded the macro.

View 9 Replies


ADVERTISEMENT

Divide Cell By X If Number Is Greater?

Mar 10, 2014

I have a lot of cells containing numbers. Some numbers are small, some are big.

I want to divide all numbers which are greater than 300 by 1000.

IF cell A2 > 300 THEN divide by 1000.

How to do that? Is it possible to convert value in the same cell like using conditional formatting principle?

View 7 Replies View Related

Equally Divide Value From One Cell Into Array

Jan 11, 2012

I am trying to do:

Say value in A2 and A3 is 4.5 and 5 respectively
and the value in A1 is and 1 respectively
B2 and B3 have zeros.

Case 1 :
Now I would like to have value A1 in C2:AZ2 till the value in A2 gets exhausted.

Hence C2 = 1, D2 = 1, E2 = 1, F2 = 1, G2 = 0.5, H2 = 0, I2 = 0 ... and so on

Case 2 :
Values in C3:AZ4 should be A1 till A3 gets exhausted. But the constraint is the values in the above range should start from/next cell when we left CASE1

Hence C3 = 0, D3 = 0, E3 = 0, F3 = 0, G3 = 0.5, H3 = 1, I3 = 1, J3 = 1, K3 = 1, L3 = 0.5 ...

I am using the below formula -

For CASE-1 : C2 is
=IF($A$2>0,IF(SUM($B$2:B2)$A$2,$A$1,0),0)

D2 is
=IF($A$2>0,IF(SUM($B$2:C2)$A$2,$A$1,0),0)

and so on...

But this works only if the numbers are whole numbers, I tried a lot but I could not get a formula which works with integers. The above formula will fail if the number is say 4.5 -having decimal part.

For CASE-2 : C3 is =IF($A$3>0,IF(COUNTIF(C$2,1)>0,0,IF(SUM($B$3:B3)$A$3,$A$1,0)),0)

D3 is
=IF($A$3>0,IF(COUNTIF(D$2,1)>0,0,IF(SUM($B$3:C3)$A$3,$A$1,0)),0)

When the numbers in A2 and A3 are decimals and not the whole numbers.

View 9 Replies View Related

Divide By X Automatically In Same Cell Upon Entering A Value

Mar 24, 2007

How do I enter a value into a cell and divide that number automatically by another value all within the same cell.

For example..

I want to enter 20 into a cell and have it change into 17.24 (20/1.16) automatically all within that same cell.

View 3 Replies View Related

Macro For A Formula To Divide One Cell By Another And Past It In A Third Cell.

Apr 9, 2009

I am trying to write a macro where I divide the value of one cell by that of a second cell, multiply it by 500 and then to paste the outcome of the formula to a third cell. This is what I wrote

View 5 Replies View Related

Divide Cell By The Number Of Populated Cells In A Column

Apr 11, 2014

I have attached a sheet as an example, as i am trying to Divide a cell by the number of populated cells in that column e.g column (A) has a table of 16 but only has 13 populated cells in that column, the sum would be something like this =sum(A18/13. Sometimes the column will have less and at times more populated.

test sum skip blank cells.xlsx‎

View 2 Replies View Related

Elseif Statement In Vba: If The Selected Cell Falls Between 1/01/06 And 31/01/06 Then Jan Would Be Selected

Oct 10, 2006

Basically it is a if statement saying that if the selected cell falls between 1/01/06 and 31/01/06 then Jan would be selected. The end part is not a problem; I’m just not sure how to write the one line of code that would test if the cell falls between the two dates. I attemped to create it as shown in the code attached below but wasn't successful. I used an else if statement to test the other 11 months.

Sub test()
Dim SelectDate As Range
Set SelectDate = Range("SelectedDate")
If selectedDate >= 1 / 1 / 2006 And selectedDate <= 31 / 1 / 2006 Then
ActiveSheet. PivotTables("PivotTable1").PivotFields("PnLDate").CurrentPage = _
"Jan"
ElseIf selectedDate >= 1 / 2 / 2006 And selectedDate <= 28 / 2 / 2006 Then

ActiveSheet.PivotTables("PivotTable1").PivotFields("PnLDate").CurrentPage = _
"Feb"........................

View 4 Replies View Related

How To Divide Cell If Cell Contains Less-than Symbol

May 31, 2013

Column (B) contains two different units, either (ug L-1) or (mg L-1). I have this formula, =IF(B2="(ug L-1)",A2/1000,A2), which copies the value in column A to column C, so for cells that are in (mg L-1) units, it's a direct copy, but for cells that are in (ug L-1) units, it divides the value in A by 1000. However, I can't remember what the formula should be if the cell contains a "<" symbol AND is also in (ug L-1) units.

e.g.
< 0.004(ug L-1)

How can I change that to <0.000004?

View 7 Replies View Related

Divide Number Cell By A Set Or Fixed Number

Jul 9, 2008

I am wondering if it is possible to create a formula in a cell that will divide whatever number is entered into that cell by a set or fixed number.

ie. I enter the number 9 in the cell and when I press enter, the 9 is instantly divided by 15 and the answer is displayed in the cell where I just typed the 9.

View 14 Replies View Related

If Column A = 0 Then Adjacent Cell In Column B Divide By .3

Feb 27, 2009

Im wondering if this can be done in excel..

2 columns

if the value in column O=$0.00 then I need to divide the adjacent cell in column L by 0.3 or multiply by 30%

this is the way I was trying to do this...

=IF((O2:O6722)=0,DIVIDE(L2:L6722).3)

I have tried it several different ways and cannot get it to work - is it my formula or can this even be done because I can't reference just one cell?

View 9 Replies View Related

Excel 2010 :: When Cell Selected Can't Use Arrows To Move To Another Cell While Pointer Is Over The Cell

Apr 18, 2013

When I use the mouse pointer to select a cell I can't use the arrow keys to move to another cell while the pointer is over the cell and I can't edit the cell while the pointer is over the cell. If I move the pointer away from the cell then I can move around and edit as normal therefore I don't think this is a scroll lock issue.

This issue also happens when I select a tab. If I select a tab and then leave the pointer over the tab I selected then I can't use the arrow keys to move around the worksheet or edit a cell; if I move the pointer away from the cell then I can move around and edit as normal.

I am using MS Excel 2010.

View 1 Replies View Related

Divide By Zero Error

Apr 8, 2014

I have conditional formatting on a cell based on a formula, when I entered the solution of "if then 0 " but the cell doesn't see the result as a 0, if I manually enter the 0 the conditional format works.

I even tried putting the formula in another cell and then referencing to that cell, still didn't work...

The "divide by zero error won't trigger the conditional either......

[Code] ....

View 3 Replies View Related

Divide A Given Value Into Several Cells

Oct 10, 2008

If I have a value of lets say 53, I need it broken down into equal and whole numbers across the spread sheet with the last one being the remaining value.

Currently for example in cell F5 I have a value of 41 that I need to break down so
I have done the following:
In Cell P5 =IF(F5>=25,F5-21,F5)
Then in Cell Z5 =IF(P5>=25,P5-21,P5) and this goes on until I have zero value from the original value in the last cell can i not do this all in one formula and have the results populate in other cells.

View 3 Replies View Related

Divide By Zero Error

Aug 20, 2009

I am creating a 'weekly average spreadsheet' (Excel 2007) for a teacher. It has a column for each student's name and his test grade for each day (M-F). The last column gives his weekly average.

She also needs an average for all the students' for the week (vertically). My formula is correct, i.e., =AVERAGE(H2:H11). However, I'm getting a divide by zero error because I have some blank rows above my formula (so she can add new students' names as they come.

How can I get rid of the divide by zero error so she can see the running averages as she inputs grades (but still leaving empty rows for new names)?

View 12 Replies View Related

All Cells Divide By 100

Feb 2, 2014

I have just started to try and learn VBA for excel. the resource I have been using are books and the WEB. Some how, not sure how there was/is some code where all enteries in all worksheets are divided by 100, i.e if I enter 2222 after clicking the enter button the result in the cell is 22.22. I have deleted all macros and code however the problem still exist.

View 3 Replies View Related

Can I Divide A Combobox Value By 2

May 21, 2009


If CheckBox1.Value = True Then
Range("e25") = ComboBox6.Value
ElseIf CheckBox2.Value = True Then
Range("e25") = ComboBox6.Value / 2
End If

Im getting an error on the second to last row, Ive never tried to divide using VBA before and I have no idea how to!

Also the amount im trying to divide will always be in the format hh:mm

View 9 Replies View Related

Divide By Zero Error. #DIV/0

Oct 16, 2006

I have a database that requires me to find the average of some data over several columns, however if one of the values I have to divide by is a zero I get a 'Can't Divide By Zero Error' is there any way to override this ? So that if a Divide by Zero Occurs, instead of returning a 'Can't Divide By Zero Error' it just replaces it with a Zero instead ?

View 6 Replies View Related

Fill Range Of Cells With Text When Listbox Option Selected - Clear When Not Selected

Jul 25, 2014

I am using this code to hide or unhide rows of text on another sheet:

VB:
Sub ProcessSheet1ChangeOnCellJ7(ByVal Target As Range)

Dim sAddress As String
Dim sValue As String

'Get the address of the cell that changed without '$' signs
sAddress = Target.Address(False, False)

[Code]....

When the "Not Pursuing" list box option is selected (in cell "J7" or "J8" in Sheet 1) I need to add (or over-write) "Not Pursuing" to the range of cells in column "B" (in the "Tasks" sheet), but only for that particular Goal, meaning a limited range of cells in column "B". If the "Pursuing - Show All Tasks" option is selected for a Goal then these same cells need to be blank so that the appropriate person can enter their name into the cell.

The purpose for adding "Not Pursuing" automatically to these yellow highlighted cells is that it will facilitate filtering of tasks by individual in the "Tasks" sheet..

Again I have tried several times to upload a sample file and am unable to, which I know makes it more difficult to solve. (Is there some common mistake people make? I know it's an allowed format and is very small in file size....)

Code solution can be entered directly beneath:

VB:
If Target.Value = "Not Pursuing" Then
ActiveWorkbook.Sheets("Tasks").Rows("29:29").EntireRow.Hidden = False
ActiveWorkbook.Sheets("Tasks").Rows("30:48").EntireRow.Hidden = True

View 1 Replies View Related

Divide Data Into Different Sheets

Apr 7, 2014

I have minutes of meeting and have to divide them into different sheets against completed, and different departments and dept HOD responsible for it. How do I do it without "Copy/Pasting" the code? Also I have to remove the ones that are done. Any macro or something that can be written for these.

format of sheet
Sl No. | Date | Remarks | Dept | Dept Head 1 | Dept Head 2 | Status

I have to get data into different sheets against Dept, Dept Head 1, Dept Head 2 and remove the "Done" status to different sheets.

How do I do it without manual labor?

View 1 Replies View Related

Divide Data Into Two Categories?

Aug 1, 2014

I have 10 years from 2003 to 2012 and need to divide this into 2 categories pre-cisis and post-crisis. How can I do that?

View 3 Replies View Related

How To Divide Data Into Categories

Aug 1, 2014

I am working on my thesis empirical part now I have 10 years from 2003 to 2012 and need to divide this into 2 categories pre-cisis and post-crisis. How can I do that?

View 10 Replies View Related

Divide Population Into Deciles

Jun 15, 2009

Excel has a QUARTILE function to divide a population into quartiles. I'm trying to do something similar but divide a population into deciles (i.e., every 10%). Is there any easy way to divide a large population into deciles and to assign a decile to each value in the population (i.e., top 10%, 11-20%, 21-30%, . . . bottom 10%)?

View 2 Replies View Related

VBA To Divide Rows Between Worksheets?

Jun 20, 2014

I have a data extract that gets generated at the end of each month that I post into the 'Full Extract' tab on my example spreadsheet.

writing a macro that will divide the various items in the 'Extract' based on the Reference, (some items may need to go into multiple sheets)

then draw down the formulas that need to be applied to the item.

View 2 Replies View Related

Function 2 Divide A Number (ie $1.00) By % (ie 25%) To = ($4.00)?

Sep 6, 2005

=1/25%

is it that you want a UDF

Function MyFun(a,b)
MyFun = a / b
End Function

Usage:
=MyFun(1, 25%)

Mangesh

"Gonecoastal1" <Gonecoastal1@discussions.microsoft.com> wrote in message
news:B257DADD-0042-4CF8-88DF-1D17AEAFF627@microsoft.com...

View 14 Replies View Related

Add Two Columns Together And Then Divide The Sum By Another Column

May 11, 2009

I may not even be calling it the right thing. but let me explain what i'm looking to do. i've got three columns on a spreadsheet and i need to be able to add two columns together and then divide the sum by another column. so something like this:

4+4/636 = 79.5

d2+f2 (divided by) h2 = 79.5

View 3 Replies View Related

Divide Only With Number Of Cells With Value>0

Aug 27, 2009

I really struggle with the following scenario:

A1=5 B1=4 C1=0 D1=0 E1=5

What I want to do is to divide the sum of those cells with the number of cells with a value > 0 (but all cells must be controlled to check if the value > 0).

In real life it's easy to see that I want to do 14/3 (A1>0, B1>0 and E1>0 equals three cells), but how to write this formula in Excel?

View 3 Replies View Related

Divide Two Cells If No Text In First?

Jan 6, 2012

How to divide two cells if there is no text in the first?

i.e.: if there is text display a 0 and if there is a number to divide it with a second number in another cell.

View 7 Replies View Related

Divide Two Groups Of Cells?

Sep 21, 2012

I am trying to divide the total of two groups of cells and I used the following formula:

=sum(B3:M3)/(B17:M17)

However, that is not a correct formula.

View 4 Replies View Related

Divide Value In Column A By Data In B:AO Using VBA

Aug 15, 2013

I'm trying to divide the value in column A by the data in B:AO using VBA, however I need to repeat this for many rows (the values differ for each row).

There could also be a different amount of rows with data in each time, and there is also a single blank row after every 18 rows with data.

View 1 Replies View Related

Divide Without Using Temp Column

Feb 16, 2007

In A1 I have the value 60 I want it in 1:00:00 format

What I do is, I divide that by A1/24*60 and the copy that and paste-special-value on A1

Is there any way to convert the number 60 into 1:00:00 format without having to do calculation in temporary columns?

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved