Auto populate column by reference? - excel

I am working on the following sheet, called Raw_Data:
In a new sheet, I want to copy the registration_date column by reference. This means that if I change the registration_date on the Raw_Data, the changed value should be reflected in the new sheet.
To implement this, I have entered the following =Raw_Data!C2. So far it works fine as you can see below:
But the problem is that when I double click on the little green square here, it doesn't automatically populate the entire column.
I don't want to manually drag-and-drop because there are several thousand rows. Does anyone know how I could automatically populate the column by reference?

While there are some automation things you could do, I think a lot of that would be overkill for what could be just an input issue with how you are choosing to copy in Excel.
If you find that you need to copy a large block of data, rather than dragging the corner of your cell like that, try one of these alternate methods:
While selected on the cell, press CNTRL + C. Then in the 'Name Box' (where it shows the address of the cell you are on), type in the cell where you want to go (A17000); then press SHIFT + ENTER. This will jump you to that cell, and will highlight all cells inbetween where you were and where you are going. Then press CNTRL + V.
Another method of moving around a large data block in Excel is to hold CNTRL and press an arrow key. This will move you as far down the data block as possible. Note that this will not work on a blank sheet, as there is no data and therefore Excel doesn't know when to stop.
Again - some automation would be possible here, but moving around an Excel worksheet is something you will be doing too frequently in too many different ways to want to automate what might be 5 keystrokes once a week.

In excel the "double click to fill" feature is a heuristic based feature that fills the cells that appear to be relevant with the selected formula (+ reference corrections).
In your case there is no hint the heuristic can use to tell what to fill so nothing is being done.
Regarding dragging "several thousand rows", that's not a real problem. If you only do it once, there no reason to even trying anything "smart" or complicated.
You can also copy the source cell, select all the cells you want to fill and then paste. You can select cells in any way you like, not just dragging.
You could instead of all the dragging/copying/filling approach simply copy directly from the source, and paste by reference.
As a last resort, you can always go for a VBA solution to do that for you.

Related

Automatically copy excel values not formulas

I am looking for an automatic version of this feature:
https://www.technipages.com/excel-copy-and-paste-values-without-formulas
Is there a built in Excel function that can do this automatically without manually copy/pasting each cell? I have a column of functions and I want to have another column of values beside it.
Thanks!
I'm not sure what you mean by "automatically", but this should at least speed up the process:
Select the cells you want to copy the content from and press CTRL+C
Click in the new cell and instead of using CTRL+V, use CTRL+ALT+V. This will open a dialogue box, in which you have to check "values". This can be done with another keyboard shortcut V (english version of Excel, might be something else in your language).
This might seem complex, but it's actually pretty fast.
Instead of pasting the cells with CTRL+V, you now paste the pure cell values with CTRL+ALT+V + V (+ ENTER, depending on whether you use the english verion or not).
This at least saves you from using the mouse and clicking through additional menues. Hope that helps!
#J Connor, if I'm not mistaken you are in need of PROGRAMMING method, as you have written Automatically.
Here are few simple steps to get the Solution.
Method 1
Range("A1:B10").Copy Destination:=Range("E1")
Method 2
Range("A1:B10").Copy Range("E1").Select ActiveSheet.Paste
Few more I can suggest. ☺

How do i create a Power Query custom column AND insert an excel formula into each cell of the final table?

I want that when the table is created there will be a fully functioning excel formula. If I try with "... each "=[#[Prog.]]" there will insert only the text not the formula.
P.S.: I'm new to this so, excuse me if this is basic.
From what I understand, you can create Excel formulas in Power Query and pass those to your Excel worksheet but the worksheet won't automatically recalculate. This earlier post addressed the same thing.
I tried this out by creating a table with two columns: "Column1" and "Column2", with the numbers 1 & 2 in each, respectively. Then, I loaded the table into Power Query and created a new column, "Custom", with the formula, "=" & Text.From([Column1]) & "+" & Text.From([Column2]). (To be clear, the = here is not the = that is already populated when the new column dialog box pops up, it's additional.) Anyhow, I got this table from that formula:
Then, when I clicked "Close and Load," my Excel worksheet was loaded with this:
Notice it looks just like text, but in the formula bar, it looks like this:
Notice there isn't a ' before the =, so it's a formula. If it were just text, it would be '=1+2 instead of =1+2.
Since the cell doesn't automatically recalculate, I had to click the cell I wanted to update, and then click in the formula bar and then press enter. That gave me this:
I tried to use F9 to manually recalculate, but it did not work.
Also... Every time I refreshed my query, my worksheet was set back to just the text-looking formula (i.e., =1+2) and I had to re-recalculate manually. That would be a real pain to have to do that for a lot of cells each time you refresh your query.
#Umut K posted a VBA-based workaround to trigger refresh all in the earlier post, but I think what you are asking to do might be more trouble than you're looking for.
The above answers are correct that the formulas do not automatically recalculate, even though they are in the cell correctly. A workaround/trick that I found was to use -Find/Replace to trigger a recalculate on every cell in one step. Go to one of the cells with the formula; to copy the entire formula. to open the Find/Replace dialog. in both the Find What and Replace With boxes in the dialog. Click on Replace All. All the cells except the one you are in will recalculate. Then, exit the cell you are in, and it will also recalculate.
It seems stupid, but it works.

How to change the tab color based on a cell in the worksheet?

I have a very large spreadsheet with lots of worksheets that I use to create invoices based on a project number. Each project doesn't get billed on a monthly basis. I have to print each invoice to PDF and to avoid having to open every tab to see if there is information to bill, I'd like to change the tab color based a cell which contains the total of the invoice.
I have used VBA very little but have found several macros that are trying to do the same thing but because they rely on something different, I can't get what I need. I found one that just turns all the tabs a color. I found one that changes the color based on a true/false formula. I don't have the knowledge around this code to change it so that if cell H22 is >0, it turns the tab a color.
The invoices created before I took my role aren't consistent so not all totals will be in cell H22 -- it could be H14. I'm even willing to put a button on each tab that I could press to apply the macro as I do my preliminary work on each tab. I just don't have the knowledge good enough to know how to write the code. Thanks!
The easiest way would be to find an cell that none of the worksheets use (say AZ99) and do the equivalent of the H22>0 example you described on each sheet.
e.g sheet1 might have AZ99 as X10>0, sheet2 might be Y11>0 or whatever.
Use the true/false VBA code to look at cell AZ99 or whatever the cell you choose is.

Transform data calculated via formulas into static values

The way I have been using excel to transform data calculated via formulas into static values was to select each cell, press F2 to edit it and then press F9to replace the content of that cell with the result of the formula in it.
I was wondering if there is a convenient way to do this process to a group of selected cells. It would come in handy if I wanted to do this to hundreds of cells at a time.
Could anybody please tell me if that is possible? And if so, how?
If a VBA based solution is viable, then this short routine should suffice.
sub Values_Only()
with selection
.value = .value
end with
end sub
Just select a group of cells and tap Alt+F8 then Run the macro. Optionally, use Options in the Macros dialog to set a hot key combination.
You may also find the Quick Access Toolbar (aka QAT) of use to assign the Paste Values command to a hotkey. Mine is set to Alt+2. With any group of cells selected, Ctrl+C then Alt+2 is sufficient to revert formulas to their returned values. See this for more information.
Highlight all of the desired cells. Copy them. Then right click the highlighted area and select the 123 paste option.

insert hyperlink for more that 1000 entries in excel

i habe many entries in excell ( more than 3000 ).
actually their are hyperlink but just like a text. i need to convert them in excel hyperlink but dont know how do to that with thousends of entries. please help.
\\192.162.0.2\public
\\192.162.0.2\public\Big-PC.log
\\192.162.0.2\public\InstantReview-ExperimentalHive.reg
\\192.162.0.2\public\InstantReview.reg
\\192.168.0.2\public\Invitation-BLUB.ir
Just use the formula & drag;
=HYPERLINK(A1, A1)
Edit;
I put =HYPERLINK(B3, B3) in the formula bar and hit enter (to get the colour effects that don't seem to appear otherwise for some reason) then dragged down;
I'll give you a generic answer to these sorts of problems.
start Macro recording
convert the first item (convert your
fisrt text cell to hyperlink)
stop Macro recording
open the recorded macro and copy the
code snippet that does the job
write a function (using the code snippet) that iterates over
all your items and does the job
(If you have further problems with one specific step, then that should be considered as a new question, I guess)

Resources