Increment all numbers - excel

Suppose I have a list of numbers starting with 32,33,33.1,34 and so on. So what i am trying to achieve is , if I will replace the number 32 to 42 then all other numbers should also change like 42,43,43.1,44. Is there any way to achieve this using any editor or logic or may be in excel sheet.

In an excel sheet, you can use Paste Special to change all the values in one go:
Type 10 in a cell somewhere, and copy that cell.
Select the range containing the numbers and "Paste Special" > "Add".

In Excel. Put the number 32 in cell A1. Then in A2, put '=A1+1'. In A2 put '=A1+1.1' etc. Then when you change 32 to 42, all the other cells will be updated automatically.

Related

How can I count the numbers greater than 18 in same cell in excel

How can I count the numbers greater than 18 in same cell in excel
20
26
37;28
17
Not provided
Not provided
Not provided
17
30;26;6;4;3
Not provided
Not provided
30
Assuming that:
1) The range in question is A1:A5
2) For a given cell within that range, if there are multiple numbers within that cell then these numbers are only ever separated by commas
then, array formula**:
=COUNT(1/(1/(1/(0+(0&TRIM(MID(SUBSTITUTE(A1:A5,",",REPT(" ",MAX(LEN(A1:A5)))),MAX(LEN(A1:A5))*(COLUMN(INDEX(1:1,1):INDEX(1:1,1+MAX(LEN(A1:A5)-LEN(SUBSTITUTE(A1:A5,",","")))))-1)+1,MAX(LEN(A1:A5)))))))<18))
Change the <18 at the end as required.
Regards
**Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
You want to do some pre-processing of the data. From my experience it's easiest to copy the relevant data to notepad (or better: notepad++), and use find and replace (ctrl+h) to replace all separators (commas, semicolons, etc.) by tabs (just copy-paste a tab into the replace by field) and then copy it back to excel. Each data element should now be in its own cell.
Then in excel, use =COUNTIF(your_range_here,">18") and it should give you the count of everything greater than 18 (not equal to 18)

Is it possible to specify some value/text in a specific number of column cells depending on the input of another cell?

If I have a cell in which the input has to be a number, is it possible to insert some specific text in a number of consecutive columned cells somewhere else in the sheet.
I'm not sure whether this is done with a formula or another built in function.
As an example, say I have a cell E4.
If I enter the number 3 in E4, the cells F1,F2,F3 show some text. If I change the number in E4 to 6 then cells F1-F6 now display some text.
Is this at all remotely possible?
I know I would be able to to do this with multiple IF-THEN-ELSE, but is there a more efficient method?
I'll presume you are in a google-spreeadsheet and not in an excel (your tags are confusing btw)
I would do that using a hidden cell to minimize the numbers of IF statements.
Saying E4 is your numeric cell, put only one IF in F4 like
IF(E4=1;"text text2";IF(E4=2;"othertext othertext2 othertex3"; IFS... ))
So you will have the whole texts in a unique cell (I separated then by spaces but if you have spaces in your text just use a more convenient character).
Then you can do a SPLIT on G4 like
=SPLIT(F4;" ")
(or split on the character you have used).
And it will separate your data in 1, 2, 6, or how many rows you'll need for your data without having to make if statements for each row.

excel pointing to a cell when the number of the cell is calculated

how do I point to a cell when i calculate the number of the cell any time diffrently?
exemple:
='sheet1'!$F(C4+8)
In case that in C4 there is "2" then excel will read it as
='sheet1'!$F10
OR
='sheet1'!$F(Y9*8+X4:E1)
and in case of Y9=2 X4=32 E1=16
THEN excel will execute:
='sheet1'!$F18
I'd prefer to use INDEX rather than INDIRECT, i.e.
=INDEX(sheet1!$F:$F,C4+8)
You can replace C4+8 with any calculation that returns a row number
That has two advantages over INDIRECT - it isn't "volatile" and because the range isn't text it can adjust if you want to delete columns or copy across etc.
You will have to use INDIRECT():
=INDIRECT("'sheet1'!$F"&C4+8)
INDIRECT takes a text and converts it to a range. You can put formulas and other calculations inside.

Change variable horizontally in excel formula

I want to change a variable in an excel formula horizontally and maintain one variable constant.
O3/$C18, P3/$C18, Q3/$C18
I can keep the the bottom variable constant by using the $ symbol but when I want to extend the formula to additional cells, the top variable does not change horizontally, rather vertically.
Thank you for your help. Cheers
The dollar signs in excel "fix" the item to their right
$C18
means C will always be fixed, and 18 can change
C$18 means C can change, but 18 is always fixed.
$C$18 means C is fixed and 18 is fixed (ie always use C18 no matter what direction you drag the cell)
I dont fully understand what you want to do but hopefully the above will help
based on the comments below i think i understand what you mean
try a formula like this
=INDIRECT(ADDRESS(1,ROW()))/$C$18
here address takes the row and column, so row = 1 and column = which ever row you are on (so row1 = A, row2=B etc)
then indirect lets you use that as a reference point
Hope that works
If I understand you correctly, you want to copy your formula vertically, but have the columns update as if you were copying horizontally. For example, you want to copy =O3 to the cell below it as =P3.
For the top, consider the Offset() and Row() functions. Let's say that Cells A1,B1,C1 are 1,2, and 3. Try =OFFSET($A$1,0,ROW()-1). If you copy that formula vertically, the result will be 1, then 2, then 3.
So in your case, try =OFFSET($O$3,0,ROW()-1). It probably needs a little adjustment.
Here's another way to do this:
Start with the formula in this form:
=O$3/$P$18
Copy and paste it across so that you get:
=O$3/$P$18 =P$3/$P$18 =Q$3/$P$18
Copy the two formulas you pasted and select the cell below the first formula.
Then do a Paste Special / Transpose, which can be accessed by right-clicking the selected cell (that is, the one below the first formula that you entered) and then choosing the button that shows a little two-cell range flat and then upright.
Finish up by deleting the formulas in the cells you just copied from.

Force Excel 2007 to treat all values in a column as text

I have a large column of data in Excel. This data should all be treated as text, but in some cells Excel is "magically" changing the data to numeric. This is screwing up my vlookpup() functions in another part of the spreadsheet, and I need to override Excel's automatic data type detection.
If I manually go through the cells, and append ' to each numeric cell, it works. I just don't want to do this by hand for several thousand cells.
For example, this works:
Manually type '209
And this does not work:
Manually type 209, right click and format as text.
If changing the format of the column is not an option, it's helpful sometimes to create another column that's 'vlookup friendly' and leave your main column alone.
This is a trick I've used a few times:
Say your 'mixed' column is column A.
In column B, enter the formula:
=CONCATENATE(A1)
or as Jean-François pointed out in a comment, the shorter version:
=A1 & ""
And drag it down for to the bottom row.
Column B will be all strings. The VLookup can then use column B.
Under the Data Tab, open the Text to Columns wizard and set the Column data format to Text. The destination cell can be set to the original data cell, but it will replace the original formatting with text formatting. Other aspects of formatting e.g. Bold, color, font, etc. are not changed using this method.
Setting the cells to "Text" format, as Jean mentioned, should work. The easiest way to do this, in any version of Excel, is:
Right-click cell, "Format Cells", "Number" tab, select "Text" format.
Have you tried setting the cells' number format to "Text"?
In Excel 2003: Format > Cells... > Number > Category: Text.
I don't have the more recent Excel versions, but it has to be something similar.
I tried all the above but didn't work. And then added an apostrophe before the number. Only then it changed to text from the exponential notation.
If you already have your data and manually adding a quote in front of your data in each cell is not an option you can use a helper column and write
="'"&A1
in B1, where A1 is the reference to your cell, and drag down the formula in B1 to the bottom. At this point you will see the quote, and you need to paste data in column B as values (CTRL+C & ALT+E+S and select values, or paste special as values from the top menu). Then find+replace a '(quote) with a '(quote) and you will have a column with values forced to text and a quote in front of each numeral representation of the number.
Updated for Office 365 / Excel 365:
CONCATENATE is being deprecated and replaced by CONCAT.
This method still works, i.e. I need 7E10 to appear as 7E10 and not 7.00E+10
Microsoft documentation source here.

Resources