Column A contains leave dates, Column B contains clinicians. Data was extracted from VISTA and only includes leave date for first employee listed. Is there an easier way than copying and pasting to extend the dates in column A to include each employee? Most likely I would be working with over 50,000 total rows ( at least to begin with), so I would prefer to avoid copying and pasting.
Here is what the data currently looks like:
enter image description here
Here is what I would like the data to look like:
enter image description here
Follow these steps:
Select entire column with Dates
Press Ctrl + g
Click Special...
Select Blanks
Click OK
With the blank cells selected (and assuming the first blank cells is A3) put this into the formula bar: =if(B3<>"",A2,"")
Instead of pressing Enter to save the formula to just the first blank cell, press Ctrl + Enter to save it to all selected cells
Right click on any selected cell and change the format to Date (Screenshot below at this point)
Select the entire column A again, then copy and paste special as values to convert the formulas to date values that you can sort/filter on. (Let me know if you need more detail on this step)
Related
Remove Formula but keep data with source formatting ?
I have excel data on which couple of columns have formula. I need to remove the formula but keep data intact with formatting.
Everywhere on google below solution is given
Select the cells with formulas you want to remove but keep results, press Ctrl + C keys simultaneously to copy the selected cells.
click Home > Paste > Values
But its not keeping the source formatting like Merged cells etc.
Then instead of doing click Home > Paste > Values I did click Home > Paste > Values and Source Formatting but it is still keeping formula
How can I remove the formula but keep data intact with source formatting ?
Update :- Screen shot based on Tim answer
Here is one option:
Create a new column to the right of the column whose content and formatting (but not formula) you want to want to preserve
Copy the column, and paste (all) into this new column. This will bring in formatting, values, and formulas
Then, copy the original column again, and paste this into the new column using Paste Special. You may find this from the drop down menu, or using Alt + E + S. In the dialog box, make sure that only the "Values" option is selected.
The basic idea is to make a carbon copy of the original column, then to wipe out the formulas only.
As you can see in the picture, I have a column with many duplicate values. I would like to delete the duplicate cell values leaving only the top value, but at the same time move the the rows up like so:
Does anyone know what equation I would write to achieve this?
Remove duplicates on the first column, by selecting the particular column and clicking on remove duplicates
Select the rest of the data
Press f5-->Special-->go to special dialog box appears
In the dialog box, check in 'Blanks' and Click ok
You will see all blank cells selected. Right click and click on delete
You will have a option box. Select shift cells up
Thats it.
Assuming your data is consistent i.e. values in left most column (as per your image) are repeated 5 times and is in Column A with corresponding values in Column C to Column G, try the following
In Cell I2 enter the following formula
=OFFSET($A$2,FLOOR((ROW(A2)-ROW($A$2))*5,1),0)
Drag/Copy down as required
Then in Cell J2 enter
=OFFSET($C$2,(COLUMN(C2)-COLUMN($C$2))+(ROW($C2)-ROW($C$2))*5,COLUMN(C2)-COLUMN($C$2))
Drag/Copy down as per data in Column I and across (to right) till Column N. See image for reference.
Note : If any of the target cell is blank then result will show 0 as output.
I'm after some pointers.
I want to input text into some cells based on the contents of others.
Current formula that I'm using in cell B1 is
=IF(ISERROR(FIND("example",A1)),"no","yes")
So far, so simple. This works. Inputs 'yes' in B1 if 'example' is located in the cell A1, copy down.
However, there are some cells in the B column which have already been formatted with other text in, and I want to apply this formula on the entire spreadsheet without removing the existing text in column B. So far, the only thing I can think of is by putting this formula in the C column, copying down then moving the text from the C column to the B column - but this requires laborious copy and pasting that kind of negates the time saving provided by the formula.
What is the best way to achieve this? Do I need to resort to VB to scan the entire sheet, iterating through A1-A30000 and inserting the requisite text in B column?
Cheers.
Edit:
So, this has been pretty much sorted, with a variety of suggestions.
However, the actual formula I'm using is:
=IF(ISERROR(FIND("example",A1)),"","yes")
as I only want text to be put in columnB if the pattern is found. This has presented another problem! The double quotes signifying no replacement if the pattern ISN'T found actually inserts a 'NULL' character in there; when you try and select the blank cells on the next iteration of the operation, no cells are selected, as even though there is no visible character, Excel thinks there is. xD
This is solved by writing a macro function to remove Null characters.
Excel is infuriating sometimes. :P
All of the information and advice already given is definitely correct and gets the job done,
byt thought I'd add one that does not require ANY changes to the existing data (eg sorting or filtering):
Put your formula as you described is cell B1. Apply any conditional formatting to that cell, as required.
Now select and copy (ctrl+C) cell B1. Select column B (click on column heading).
Then Click find and Select (binoculars icon) - on Home ribbon tab. Choose go to Special.
In the popup choose Blanks and click ok. You will note all blank cells in colum B are selected. Don’t click anything, press Crtl-V.
Voilà, your formula and conditional formatting is pasted into all blank cells, leaving the rest alone.
Quick keyboard sequence:
select B1
Press ‘Ctrl + C’
Ctrl + ‘Space Bar’
Press ‘Ctrl + G’
Press Tab twice to go to ‘Special…’ button, press Enter
Press ‘K’ for blanks, Press Enter
Press ‘Ctrl + V’
(optional) press escape to remove selection from B1
There are a few ways to deal with this. I'll explain 2 of them :
If sorting is an option, sort your table by column B (ascending / A-Z) to get all the empty values at the top. Write your formula in the first blank cell and extend it by double-clicking the bottom-right corner of that cell.
If you cannot sort, apply filters to the table and select only the blank cells in column B. Then write the formula in the first blank cell and extend it by dragging it down to the last cell.
You might combine your existing B column values with those to be added conditionally in a single formula, say in ColumnC, such as:
=IF(ISBLANK(B1),IF(ISERROR(FIND("example",A1)),"no","yes"),B1)
copied down to suit. Then if ColumnB has become redundant, copy ColumnC, Paste Special, Values over the top and delete ColumnB. The result is to convert the formulae to the results thereof, that may increase processing speed but reduce the ease of handling additional rows (if any) subject to the same requirements.
I have an excel file generated by SAP. I need change its format from multiple tables separated by a title to one single table. This is the original table:
and i need it to look like this:
Im new to excel, so i dont have a clue how to do it.
I cant do it manually becuase the file has 5000+ rows.
Any guidance?
I usually use the generic formula:
=IF(XX="",YY,XX/ZZ)
Where XX is a cell you can use to identify a header to append to the individual transactions and YY is the cell directly above the cell you have put your formula. XX is when you need that value itself, ZZ is another value. You'll understand when you apply it.
For instance, here, you could use cell D5 to do this. I would insert two columns before column D (the value of cell D5 is now in cell F5), and put this formula in cell C5:
=IF(F5="",C4,B5)
I will then fill the formula down. This carries the Material ID everywhere down to the last row. There are two quick ways to do this in a file of this type:
Copy the formula, scroll to the bottom of the sheet, hold Shift and click the last cell in the column, then paste.
Select the cell containing the formula, scroll to the bottom of the sheet, hold Shift and do Ctrl + ,D.
In cell D5, I would put the formula:
=IF(F5="",D4,F5)
And fill it down as well to get the material description.
Now for the size per unit, you can create a column to the right of column K (column K now has 'Size per Unit' since we inserted two columns earlier), and put this formula in cell L6:
=IF(K6="",L5,K6)
Fill it down to get it everywhere.
Now, to finish it up, select the whole sheet and copy/paste values (Paste Special > Paste Values) to remove the formulae. Delete rows 1 and 2, put a filter and sort by a field such as the column 'Metric'. Go to the bottom and delete the no longer needed rows.
As a bonus, if you need to make absolutely sure that the order of the transactions is the same as initially, insert a column somewhere, put sequential numbers into it; that is the first cell in the column has 1, the second 2, then 3 etc and fill to the bottom. Be sure that it is in the filter when you delete the unneeded rows, and sort by this column when you are done.
5000+ rows is still good though, I've had to deal with 10+ workbooks each with ~90000 rows once ;)
I tried googling it and couldn't find a simple answer. How do I take one row and apply it to multiple rows? For example in one row I have 'State" and I want to copy it in the same column just all the way down (multiple rows).
I am using Excel 2007.
Shift-click the entire column (or range of rows), and then hit Fill->Down.
Though, where Fill is depends on what version of Excel you're running.
On 2007, Fill is located on the top right of the Home tab on the ribbon, in the Editing control box.
First Select to copy the Row which is to be copied from its next row. example - A1 to E1 is to be copied from A2:E2 to A420:E420
Then press Ctrl+G for GOTO option and enter destination cell number Example A420 and press to go there
From The cell number A420, Press Ctrl+Shift and Up Arrow and then all the cells between A420 to Cell Number A1 will be selected to copy .
Again press Shift+Down arrow one step to deselect The First Row / CELL A1 Row which has the content to copy from A2 Row to A420 Row.
Now press ENTER button bywhich the first row/ has been copied upto A420 Row