I have list of amounts, which are without decimal dash, but I need to add it before 2 digits from right. Here is the example of data:
So, basically, I would need to add dash / dot like that:
-1297.25
-5517.92
-4653.97
etc.
I dont know, how to treat it, since the number of digits from left side will change from case to case, therefore I cant use =REPLACE function.
Could you advise me, please?
Many thanks!
The screen shot insinuates that the cells really store Cent values ... if this is the case then make a temporary column where you use a formula =[Cell]/100 to convert to EUR with Cents in decimal place... then copy/paste values back the results and format accordingly.
If you don't want to use a formula, search for a free cell and write a 100 in it. Copy this cell to the clipboard. Select the area you want to edit, right-click on it and select "Insert content...". In the following dialog, simply select Divide and press OK. And that's it.
Related
My colleague and I have taken over a vb.net project that uses Crystal Reports (I have CR9 on my PC).
The user has given the following feedback to us on how he would like the reports changed.
1) At the moment, it is wasting space by showing empty columns. How is it possible to not show the columns where all values are "-"? (I've tried using Crosstab Expert, however there are some reports where the columns have second sub-columns with titles in, so with these ones it shows them as it treats the columns as not empty)
2) The crosstabs at the moment are displaying from left to right, and are adding next to each other. My user wants the tables to go underneath each other, so that the report goes downwards, rather than sideways. How is this possible?
If anybody knows a fix to either of these issues that would be great, thanks.
In regards to the empty columns, you can choose a custom style in the Crosstab Expert and select Suppress Empty Columns
If the dashes don't count as empty, you might need to change the crosstab to evaluate a formula which replaces the dashes as zeroes or blanks.
I'm not aware of a good way to make a crosstab separate vertically as you specified. But you could swap the rows with the columns. It appears to me you have way more columns than you do rows, which should fit better on the page.
I suppose you are using the database field directly in the cross tab which is the reason you are getting -. Possible approach would be to write a condition and use that in cross tab. something like below
Create a formula #Formula1
if {Database.field}<>"-"
then {Database.field} //You can end the condition here if you wish
else "" // If you write else then check option supress empty rows or columns as per requirement
Now create a cross tab using Formula1 and display
Coming to your second problem , If you not wish to spread cross tab horizontally then you can pivote cross tab by Right click on cross tab or go to cross tab expert and give the fields that spread in rows part and that are static in column part.
Hope this helps
you most probably going to think "what an idiot" but remember i never done any type of coding before so this is all new to me,
My problem are that i'm working on a HUGE excel sheet with loads of data that is not needed. i need to sort the data into a few columns, i only need column "A,K,AN,AQ" but in column "AS" i only need certain values (yes,no,blank) i only want the yes and blank values. like i said never done any coding before but i know that you can use an macro to do it so please help, how do i go about this?
before trying to get into macros, try to use functions with if else statements. They are quite easy to handle. Like: If (yes) then put it into X. Later, you could select all needed. Also, check the, how the dollar sign is used
use this links to see, if it is something for you.
One quick and dirty way of getting this job done would be to:
Delete the columns you don't need.
Select all cells in the range you're interested in, click the Insert menu, and choose "Table". If your columns have titles, select the box for "My Table has Headers."
-This turns your data into an array so that Excel recognizes that each row is an entry (instead of thinking that the cells are unrelated).
Now you can use the filter icon in the column headers to select and display only the rows containing the values in column X that you're interested in.
Note that there are some limitations to what the table feature is good for, so, as always, whether this is a good solution for you depends on what you want to do with the data.
For starters I have limited experience with VBA and was hoping to accomplish this task with built in excel functions, unfortunately without success. Here is the problem:
I have multiple cells with number values in them (lets say 3 cells each with a value of 1000) and I need that converted to one cell with those same multiple values (on top of each other like a list) and be able to have them formatted with commas at thousands places.
I have been successful at putting them in one cell by using an ampersand and the char(10) function along with formatting to wrap text.
However, now I cannot format with commas. Can this be done without VBA? If not some direction for writing a function would be helpful.
Without VBA
=TEXT(A1,"#,##0")&CHAR(10)&TEXT(B1,"#,##0")&CHAR(10)&TEXT(C1,"#,##0")
For example:
This is a continuation of " Is it possible to write a VBA code that searches for the exact same data or the closest one in the past? "
Basically I would like to expand the function that #Jeeped posted but for some reason it's not going as planned eventhough I'm doing the same stuff he showed.
The extra condition in this case is that the machine used to produce the juice must be equivalent to the machine of the parameters.
(the image of what I'm doing)
Basically if a juice is made on 29/09 with machine M0 for example then I want to have the parameters that were used for that juice. Obviously the parameters of 30/09 weren't used but the parameters of 25/09 for machine M0 were used.
I edited the code #Jeeped posted in my previous question to the following
=IFERROR(INDEX(C$2:C$10, MIN(INDEX(ROW($1:$10)+($A$2:$A$10>$F2)*1E+99+($B$2=$G$2),,))),"")
But I get an error and I'm not sure why but I have a feeling it has to do with what I wrote ($B$2=$G$2) but how do I fix it?
DISCLAIMER: the percentages used are fictive, it's just a function I need to get working for several Workbooks that will automate some work I need to do every month.
It looks like you want to add the condition that columns B should match G2. This should do the trick.
=IFERROR(INDEX(C$2:C$10, MIN(INDEX(ROW($1:$9)+(($A$2:$A$10>$F2)+($B$2:$B$10<>$G2))*1E+99,,))),"")
This type of formula does not make direct matches. It excludes everything that doesn't match and then accepts whatever is left over. So like the date in F2 is compared to the dates in column A and anything that is larger (i.e. later) is multiplied by a very large number. We do the same to the machine ID in G2. Anything that does not match the machines in column B get multiplied by the same very large number. By mathematically excluding anything that doesn't fit, we are left with what does fit.
It is also important to note that the ROW(1:9) is the position within C2:C10 or A2:A10, not the actual row on the worksheet.
Addendum: With the dates now unsorted, I can provide both a standard and an array formula to compensate. The array formula for I2 is,
=SUMIFS(C$2:C$10,$A$2:$A$10,MAX(IF($A$2:$A$10<=$F2,IF($B$2:$B$10=$G2,$A$2:$A$10))),$B$2:$B$10,$G2)
This must be finalized with Ctrl+Shift+Enter rather than simply Enter. Once entered correctly, it can be filled both right and down. Next is a standard formula that does not require Ctrl+Shift+Enter but accomplishes the same thing. Your results should resemble the following image.
=SUMIFS(C$2:C$10, $A$2:$A$10,MAX(INDEX(($A$2:$A$10<=$F2)*($B$2:$B$10=$G2)*($A$2:$A$10),,)),$B$2:$B$10,$G2)
I think the formula below might answer your question. Please see the image for reference.
Formula Used: =INDEX($D$2:$E$7,MATCH(1,($B$2:$B$7<$H3)*($C$2:$C$7=$I3),0),1)
Please note - this requires your date of parameter change to be sorted from newest to oldest.
To apply this formula, press CTRL+SHIFT+ENTER after writing the formula. This is required for excel to understand that this should function as an Array formula. On doing so, excel will automatically add the curley brackets at the beginning and end of the formula as can be seen in the image.
Only small difference for formula to get %Oranges will be replacing the last 1 by 2.
INDEX($D$2:$E$7,MATCH(1,($B$2:$B$7<$H3)*($C$2:$C$7=$I3),0),2)
Hope this answers your question. Please let me know if you need further assistance.
I have a query that runs in Excel, that will need to show data from an SQLbase database where I only have read-access. I cannot modify the database in any way. The column I need to be able to filter on is a varchar column, but it's values are only numbers. I need to be able to filter with between in Excel, so I've tried to do column + 0 so Excel picks it up as a number. This worked before, but now it fails on some numbers.
The number 704977990024 works, but 991098000265 doesn't. With the second one I get Data is not numeric.
This is the query:
SELECT (TABLE1.COLUMN + 0) AS "Artikelnummer"
FROM DB.TABLE TABLE1
LEFT JOIN DB.OTHERTABLE TABLE2
ON TABLE1.COLUMN = TABLE2.COLUMN
How can I make sure I get it as a number in Excel? If not in the query, then how in Excel itself? When I set the column to number in excel, it still displays as text and will not be numeric unless I try to edit the cell.
It's probably overflowing. An alternate way to get what you need Is to pad the numbers with leading zeroes. This will avoid the overflow and let you use a range. I don't know the syntax... something like where Right('000000000000000' + nu, 17) between ....
I have not found a solution to this, but I did find a manual workaround.
You select the whole column and cut&paste is somewhere else. You cut it because the colum needs to be empty when putting the data back. After that, you select your newly created column, and copy or cut it. Then you select the column where the data needs to be (the one you just emptied), and press paste > paste special. Then you select multiply (or any other) and press ok. That way the columns will be numeric.
It might be a manual thing, but it was the one solution I've found to this problem.