How To Make A Cell Read Only Decimal
Jul 1, 2013I'm trying to create a formula in a cell that references another cell but I only need it to reference the decimal. How would I go about doing this and is it even possible?
View 3 RepliesI'm trying to create a formula in a cell that references another cell but I only need it to reference the decimal. How would I go about doing this and is it even possible?
View 3 RepliesI have tried the following code, but doesn't work unless I protect the sheet:
Range("A1:A4").Select
Selection.Locked = True
Selection.FormulaHidden = False
If I protect the sheet, then it works fine, but how can I make a cell read only
WITHOUT protecting the sheet?
Is it possible to make Columns Read only? So not one can type or edit. Not all columns just the ones I need
B,C,D,I,J
I have attached three excel files .....In the file called 'sampleBook1latest' I have a button called 'click here to clear a schedule' If I click that button and choose OR,start time and duration of a surgery then a schedule that is already created wil get cleared.....I have the total number of nurses and number of nurses used saved to the side of the sheet..... The total number of nurses at the side is read from another excel file called 'Input file for # of nurses'
Now the problem is that if clear a schedule then the number of nurses used is not getting updated at the side.....if I clear a schedule then the number of nurses at the side should also get updated....for example(If I create a schedule with 3 nurses and if only a total of 3 nurses are available then..... the used number of nurses for that specific time at the side will get updated to 3 from 0 and if I clear that schedule then the used nurses for that time should again become 0)....
The other problem is that if I schedule a surgery then all details of the surgery will be saved in another excel sheet called 'input file for patient details' so if I clear a schedule then all the details of that surgery saved in that excel sheet should also be cleared......
I need to make a workbook read only depending upon certain conditions that are apparent only on start up. As I cannot assign the ReadOnly property, is my only solution to trap the Save command and dissallow "save changes".
View 9 Replies View RelatedIf I type the name Joe Bloggs How can I make whenever i type that name the computer knows to retreive a number or formula from a cell on another or same sheet.
View 9 Replies View Relatedway of changing the mode of a workbook to readonly upon opening it.
View 6 Replies View RelatedI have a column that has values ranging anywhere from 1 to 999,999 and I need a way in vba to take whatever value is in the specified cell and place a decimal point at the far left. Example:
change 175526.34 to .17552634
change 376.1 to .3761
change 22987.254 to .22978254
when the code is run I need the selected number to begin with the decimal point.
See, the tricky part is that the length of the number varies and I cant just divide by X to shift so many places to the left..
I have four worksheets in my project and I would like to protect one of the sheets so changes can't be saved. In other words, I would like to make that specific worksheet "read-only". The other three sheets I want changes to be saved with the document.
View 4 Replies View RelatedI'm trying to open a file on a network drive...but I'm getting the following error message when it opens: "This file may be read-only, or you may be trying to access a read-only location. Or the server the document is stored on may not be responding." Now, the file itself has no rights restrictions and is not read only. It doesn't appear to be locked.
Now, there are other Excel files in the same directory which I could open fine; however, the Excel documents having the above problem all have a little black icon "appears to be a padlock" (image attached) at the bottom left hand side of the Excel file icon. I tried the following:
- Renaming
- Converting to a different file format (didn't work, it won't let me)
- Opening in notepad...etc doesn't work.
This file is dated back in 2004...do you think it's corrupt? Is there anything i can do to open or recover this?
I have a vba macro that takes data from one workbook and pastes it into another workbook. In doing this I have declared a few variables of type single (I only need two decimal precision). However, when I copy the values from the cells on the source workbook and paste them into the target workbook, the numbers end up having 12 decimal places. Ultimately, this extra precision causes my totals to be off by .01 or more after a while. I have tried rounding the number as I pull it off the source workbook into the variable, but that didn't matter. How do I solve this problem? Code for pulling data from source workbook:...
View 2 Replies View RelatedBasically, I want to format a group of cells to display 1 decimal figure if the number is not a whole number. If the number is a whole number (or if the rounded first decimal place is 0) I want it to display no decimal.
View 9 Replies View RelatedI need to convert a column of numbers currently formatted with 2 decimal places e.g. 112.12 to 4 decimal places (without the decimal point). I need the end result to be 1121200. I've tried a few different suggestions given on the forum previously but can't seem to retain the 4 decimal places that I require.
View 4 Replies View RelatedI have to make a excel document in which I have length and width in feet and inch format.
E.g. 10.01 in which 10 is feet and .01 is inch
I have all the length and width values in the above format. And what I want to do is convert the inch value (10.01) to feet value (.01=.08 feet) .
Just like the calculator here does.. [URL] ........
Like
10.01=10.08
10.02=10.16
10..03=10.25
...and so on...
Here is table of conversions from inches to decimal feet. But I don't know how to get a formula for this in excel...????
Inch Decimal of a Foot
1 inch 0.0833
2 inches 0.167
3 inches 0.250
4 inches 0.333
5 inches 0.417
6 inches 0.500
7 inches 0.583
8 inches 0.667
9 inches 0.750
10 inches 0.833
11 inches 0.917
12 inches 1.000
I am trying to create a unique sample code by putting together the values of other cells that a user will input. It's all working well apart from the last part, where I am trying to include a decimal number. I want the decimal number to appear without the central "." and in a four digit format. e.g. 2.5 would appear as 0250, 14.25 would appear as 1425. This is the formlua I am using currently:
=IF(ISBLANK(B4),"",IF(LEFT(C4,1)="w",(B4&"-"&TEXT(F4,"YYMMDD")&C4&TEXT(G4,"HHMM")),(B4&"-"&TEXT(F4,"YYMMDD")&C4&LEFT(TEXT(H4,"00"),2)&RIGHT(TEXT(H4,"00"),2))))
However, where the value of H4 is 2.5, I am getting a result of 0303 (I've put this part in bold). I have attached a small spreadsheet to aid understanding.
I need a formula to multiply only the decimal number in a cell and not the integer. For example: the number in the cell is 57.3615. I want to multiply .3615 only.
View 2 Replies View Related For Each C In Sheets("data").Range("A2", Range("A2").End(xlDown))
With C
If IsDate(.Value) Then
.Offset(0, 3).Value = Format(.Value, "yyyymmdd")
Else
.Offset(0, 3).Value = Right(.text, 4)
End If
End With
Next C
which is supposed to read the cell offset 3 to the right, and then set to either YYYYMMDD or YYYY depenig on the value in the cell. I'm not sure how to specify the first part of this line - .Offset(0, 3).Value = Format(.Value, "yyyymmdd") - it keeps reading the cell in column A, rather than the offset cel.
Display Alert On Closing If Cell Not Filled In
How do I alter this code so that it acts like an INDIRECT function so will pick up a cell reference in another cell?
I can't just use A1 as I want this to change dynamically.
I am trying to get a SUM function to recognise values within a range of cells, that are immediately followed by a *. i.e. 34*
For each range i need to count the total number of inputs, count the number of starred inputs & add up all the values entered.
Currently COUNT doesn't recognise starred values, COUNTIF is set to count only starred values, and SUM wont recognise the value of the starred values.
Is there a way to only read the number element of an input - there are only integer values & starred integer values. The starred inputs are also conditionally formatted. If there is a way would it then affect the COUNT/COUNTIF element?
Pedro
When I am clicked inside a cell how can i with VBA get the defined named?
View 9 Replies View RelatedI am trying to read a value in a cell to post in another sheet.
Once the value has been copied, end. However, if the cell to the right of the copied has a value, then that value should be copied instead.
If the cell is blank, then the information should not be copied.
Basically I have a string of data from left to right being populated, with the most current value being copied to a differnt sheet.
Iit is possible to do somethiling like this? I wanna load some data from web but I need link read from cell (e.g. sheet data!B1) .. so it means :
View 3 Replies View RelatedI am trying to program a loop in Excel VBA to read the first two characters of a cell in column A and, depending on the characters returned, to print something else in column B, then move to the next row up. What I have so far below is pieced together from little insights from over the web, but currently it does nothing. Not even error messages. It has more fields (if "XX" > print blah blah) but they are all the same, so only the first two iterations are shown here for clarity.
View 8 Replies View RelatedI need a statement to look at how many words are in a cell. If there is 4, to return "Stem" to another column, if it's the 5th word or higher then to return the last word in the string.
For Example
Column A.......................................................... .Column B
SOME-TEXT-GOES-HERE....................................../...STEM
SOME-TEXT-GOES-HERE-SOMEMORETEXT.............../...SOMEMORETEXT
SOME-TEXT-GOES-HERE-SOMEMORETEXT-AGAIN...../...AGAIN
I have tried but failed miserably! I though of using a lookup statement but due to the number of variations it would be quite time consuming.
I want to design a macro to check if the cell has a comment in it. If so, the macro should read the comment and store it in a variable.
View 2 Replies View RelatedHow to read and set a cell backcolor in VBA ?
I've tried all sorts of things ( interior. colour, interior.colorIndex) but nothing gets the correct color.
is it possible to read cell content and use that in a (search)url? somekind of auto-layout or what ever?
i'd have a collumn which has a lot of titles (in different cells), is it possible some way or another to read the content of the different cells and to apply that (in an array?) to an URL?
so use 1 url and add the different cell content as a variable to it?
i.e. i'd like to use this url: [url]=[url] for the whole collumn and automatically all new lines that might be added and ,,CELL-INFO'' should be replaced bij the different cell content in the column (Column:A)
I have the following task
1. in sheet 1, column A starting A1 I have addresses of web pages. all of them are one and the same except the last digits. Sth like this
www.datapage.com/source1
www.datapage.com/source2
...
...
www.datapage.com/source16
www.datapage.com/source17
etc
2. in sheet 2 I have to import the data from these web sites as it follows
from www.datapage.com/source1 starting from cell A1
from www.datapage.com/source2 starting from cell A101
from www.datapage.com/source3 starting from cell A201
etc.
The question: I am trying to write a Macro that tooks the address from sheet 1 cell A1 and import the data through web query using the address in the cell and import it in sheet 2 starting cell A1. Then loop and took the address from cell A1 in Sheet 1 and put it into sheet 2 cell A101 etc.
I was sure it would be in your archives but couldn't find it - apologies if this is a FAQ.
I am trying to extract the data in a spreadsheet to a bunch of files, one file per cell. The cells I need have very long text strings in them, actually whole HTML files.
Using this
Dim HTML As String
HTML = Cells(RowNdx, ColNdx).text
I can only read 1024 bytes - not nearly enough. Is there something else I can do to read the cell into a string variable?
I have one excel workbook which has 10 rows of data. I need to access another excel wb which has 10 rows of data and get the variance. The key here is wb 1 has the data as I manual gather it and it changes very often. WB 2 also changes to equal the number of rows in Wb 1.
A> I would like to call Wb 2 from Wb 1 and copy those 10
B> It should be able to handle change in the number of rows in WB 2
C> It should be able to call workbook 2 irrespective i name it differently.
Is there a way i can achieve all the 3 above?