I have a spreadsheet file that looks like this:
What I want is to fill the yellow fields with the last value on the left, so for CA it will fill until 26, and NYC until 81 before SG. What's the best way to achieve this, since I have literary hundreds of these?
I have tried using flash fill and paste specials, but they only work for rows downwards, and not for adjacent rows. I also used the Home>Fill series to the right, but then it overlaps another row when I highlight them all (so it shows CA instead of NYC, SG and MC).
Can anybody help me with this problem? Thanks so much!
try this:
select from the cell CA to the last yellow highlighted cell
hit F5 or Ctrl-G to open the Go To dialog
click the Special button
in the dialog tick blanks and hit OK
now only the empty cells are selected.
without changing that selection, type a = sign
hit the left arrow, this will add a cell reference after the = sign
hold down the Ctrl key and hit Enter
Now all previously empty cells have a formula that refers to the cell to the left.
If you want, you can select all cells again and use Paste Special > Values to overwrite the formulas with the result.
Related
I am working on an excel project where I have to fill all the blank with info but it differs every some rows looks like this
and this is what I would like to achieve.
You can follow below steps.
Select cells you want to fill up.
From Home tab--> Editing section select Find & Select then Go To Special.
Select Blanks and click ok.
Now just type =Immediate above cell address you want to fill like =A1.
Then press CTRL+ENTER. Blanks cells should fill up with data from its above cell.
If you wish to remove formulas from cells then copy all cells in range and right click then paste values.
I'd like to create a rule that writes "100%" in column A whenever I write "end" in column B.
So it would be something like this:
[] X
100% end
[] Y
The brackets represent an empty cell.
I've tried:
IF(B1:B3="end",100%,"")
but I would like to leave the cells on column A empty, with no data or formulas, if the respective cell in column B doesn't contain "end".
So I've thought about adding a new rule with conditional formatting but it's not working. Any solutions?
Can be achieved with CF but rather nastily. You would need to fill ColumnA first, say with 1s - but can be hidden by (standard) formatting the text to match the background colour (ie usually white).
Then clear any CF from and select ColumnA, HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=B1="end"
Format..., select Black (probably) font and Custom Number format of:
00%
OK, OK.
If your blank cells must remain blank in reality rather than appearance then CF alone is not a solution for you.
Edit:
You can get a value to show in a cell based on the value of another cell, without having anything* in the cell, and without VBA:
*kinda
Using cells I2:J9 as an example, the steps are:
Click I2, then Ctrl+1 to open the Format Cells dialog.
On the Number tab, click Custom, then in the Type box enter: ;;; and click OK.
Hit Alt+O+D+N to add new Conditional Format and choose Use a formula to determine which
cells to format.
In the Format values where... box, enter: =J2="end" (If Excel adds $'s, remove them), then click Format...
On the Number tab, click Custom, then in the Type box enter: ;;;"100%" . (Optionally set a color, font, etc.) then hit ENTER 3 times to return to the
worksheet.
Click I2, hit your SPACEBAR once and then hit ENTER. (* Fine, I
confess: the cell isn't totally empty.)
Click I2 and hit Ctrl+C to Copy.
Select I2:J9 and press Alt+E+S+T then hit
ENTER to Paste Formats.
Now when you type end into any of J2:J9, the corresponding cell in column I will display 100%.
You can also repeat this process to add additional conditions to the same cells if needed.
Original Answer: (Alternative Solutions)
Sometimes I get stuck spending too much time on a question about a very minor issue. This is one of those times. :)
Thinking further about your question, I suspect you might not have meant you need the "cells on column A empty, with no data or formulas", but perhaps you mean you want the cells to "appear empty".
Example:
These cells do appear empty, unless you to click on the cell and then look at the formula bar:
...but the formula bar can be hidden too:
I was wondering how to add the same drop-down value (e.g. Yes or No) to multiple cells in the column at the same time? I tried selecting individual cells that I need to fill with the same value using Ctrl, and then selecting the value from the drop-down menu, but it only fills the single highlighted cell.
Is there a quick way to select cells and then add the same drop-down value simultaneously to all of them?
I'm using Excel 2013.
Thank you!
Place the drop-down in the top cell. Then select the block of cells (including the top cell) with either the ARROW keys or the mouse and touch Ctrl + d
i also found no answers for this online so came up with my own solution.
It is using macros but only a basic knowledge of how to record is needed so its very easy.
Once your drop down lists are set up, you would start with Sheet 1 and simply record a macro where you are copying the value you selected in sheet 1 and then pasting into sheet 2. then assign this macro to a button on sheet 1. every time you click the button, it will copy and paste the selected value in your sheet 1 drop down into sheet 2.
you would then do the same thing in sheet 2, except that you are copying the value into sheet 1.
you can do this for any number of sheets.
hth.
I tried it as follows and it worked:
Select a cell and select the value for it (yes or no for example). Then select the group of cells you wan to have that same value - include the original cells with the value (yes or no)as the top cell in the range. Hit ctrl and D and all the cells will fill with the value in the top cell.
I accomplished this task in Excel 2013 by doing the following:
Select the cell with the drop down response
Scroll down to the last cell in the row that you want to have the same answer
Press the shift key
Select the last cell in the row that you want to have the same response
Release shift key and scroll back up to the first cell that you highlighted
Select your response in that cell
Hit Ctrl+D (to duplicate response).
I'll try and explain a little more clearly for you.
Select, with your mouse, the top most cell in the column you want to make all YES, scroll down if you need to and then, before clicking anything hold the SHIFT (not CTRL) key while you click the bottom cell in the row you wish to update.
This should highlight all of the cells in the column from the first, to the last you clicked. Now, release the SHIFT key and select YES (or no) in the top cell. The top cell (only) will change to YES (or No if you selected that). Now, without clicking doing anything else, hold down CTRL and while holding it press D.
If done correctly, all of the highlighted cells will now match the top cell.
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 a spreadsheet that is extremely long and I would like to create a new column (actually, 8) where each cell in the new column is the sum of two cells in other columns. An obvious answer is to create the column, create an instance of the formula in the first cell, and drag the formula down. However, since the spreadsheet is so long and I would like to do this 8 times, that process does not make sense for me. Is there an automated way to do this? I have never worked with VBA but have enough programming experience that I figure I could figure it out. Thank you.
What I do, E.g. long data in columns A & B
Put formula in C1 & D1
Click in B1, Ctrl+down-arrow to go to the last cell, go over to C & D & type in any value
Click C1, Shift+ctrl+down-arrow to select the empty cells, same with left-arrow to select horizontally
ctrl+D to fill with the formula
highlight the cell(s). double click on the black box in the corner, and the formula gets filled down to the end of the data next to it.
In pictures:
hover here:
Your cursor should change to a black + when you are hovering over the dot.
After you double click, the formula will be filled down
this way will copy the formatting of that cell, but if you don't want that, you can click on the menu popup (lower left of filled area)
and select fill without formatting