Writing Formula Which Refers To Different Pages In Workbook?

Dec 29, 2013

I'm working with a multi-page workbook I use for work scheduling purposes.

This is how Sheet1 is set-up:

A
B
1
Name

[Code]....

In the cells in Column D I have used the following formula =IF('Sheet1'!B2="Yes","Holiday",""). What I have realized is that this formula is quite limited. For example not all 12 colleagues work everyday and they work different shifts on different days- each day's data is sorted so that the colleagues are organized primarily by Shift start time and then alphabetically by name- consequently if I used this formula across the entire workbook the Sheet1B2 data may not be consistently referencing the same colleague.

I was wondering if there was a way to amend the formula so that if a colleague is marked as 'Yes' in Sheet1, 'Holiday' could be inserted in Column D in the rows corresponding to where the colleague's name appears?

View 3 Replies


ADVERTISEMENT

Formula In The Name Define In Workbook That Refers To Another Workbook

Jul 26, 2009

I have a formula in the Name Define part of excel in workbook that refers to another workbook. =IF(COUNTIF([DaysWorking.xls]Sunday!$A:$A,'2009'!I1)>0,1,"")

The DaysWorking.xls workbook is a data workbook, users may change the data and after they are done, they may exit the program but not save it. The DaysWorking.xls workbook should always revert back to the original form. I've put a read only property on it, but the problem lies when the user saves the file under Save/As function. Excel then updates the link to whatever the user saves the file as. Is there a way to make sure that the formula never get's changed?

View 2 Replies View Related

Concatenate Formula: Refers To A Cell Containing 0.065formula Refers To A Cell Containing 0.065

May 3, 2006

is it possible to concatenate in such a way that formatting is retained? For example, my =CONCATENATE formula refers to a cell containing 0.065, but which is formatted as a % so that the cell shows 6.5%. Concatenating that with text, however, produces "0.065 [text]"

View 4 Replies View Related

Refers To A Group Of Cells In Another Workbook

Mar 11, 2007

I have some code which refers to a group of cells in another workbook as follows:

Workbooks("SUMMARY06.XLS").Worksheets("JS").Range("H23:H30").Value = ActiveCell.Range("B1:B8").Value

I wish to change the reference to the sheet reference rather than the tab name, but the following doesn't work.

Workbooks("SUMMARY06.XLS").sheet103.Range("H23:H30").Value = ActiveCell.Range("B1:B8").Value

And if I make two or more references to the same Workbook, can I use a with statement, like:

With Workbooks("SUMMARY06.XLS")
.Worksheets("JS").Range("H23:H30").Value = ActiveCell.Range("B1:B8").Value
End With

View 9 Replies View Related

Add Hyperlink To Shape That Refers To Website Contained In External Workbook Cell

Apr 13, 2013

I've been trying without success to hyperlink a shape in one workbook that refers to a website contained in a second workbook cell.

The hyperlinked shape is in the current workbook and the website address is in a workbook called "data source.xlsx", sheet 1, cell A1.

My last attempt was this - ('C:UsersLouiseDocumentsMA[data source.xlsx]Sheet1'!A1)

View 3 Replies View Related

Cannot Drag 2007 Formula That Refers To Table

Feb 14, 2008

i noticed that when i have a formula that refers to a table, such as:

= sumifs(table1[heading4],table1[heading1],"A",table1[heading2],true)

i can copy-paste it, i also can fill (right or left) a selected range with it,
but, i cannot copy it (right or left) by dragging.

View 3 Replies View Related

Select Every 2 Pages In Workbook

Aug 17, 2012

I am trying to run this code to select every 2 pages and update the formula's...problem is it isn't actually selecting every 2nd page, and the pages it is selecting sure isn't updating with those formulas ...

Code:
For i = 1 To Worksheets.Count - 1 Step 2
Sheets(i).Select
Sheets(i + 1).Select Replace:=False
With Sheets
Range("F28").Select
ActiveCell.FormulaR1C1 = "=RC[-2]/R[9]C[-2]"

[Code] ........

View 6 Replies View Related

Workbook With Multiple Pages

Mar 25, 2009

I have a workbook with multiple pages, two of which are labled "Summary" and "Questionnaire" On the Summary sheet, I would like to have a button or permanent dialouge box that asks the user if he wants to print the "Questionnaire" sheet. The button should have 2 options YES and NO. If they say Yes, change the contents of cell A2 on the Questionnaire page to "1". If they selct NO, make contents of A2 on the Questionnaire sheet to "0"

I have a macro that reads the contents of A2 on all sheets and prints if >o

View 9 Replies View Related

Should All Pages In A Workbook Print In Color

Mar 20, 2006

I have a color printer that is set to grayscale as a default. When I print my
excel workbook and select it to print in color in the print driver properties
the first page prints in color but the other pages print in black and white
even though the other pages are in color.

View 12 Replies View Related

Exporting Selection Of Pages From Workbook?

Mar 11, 2014

I am exporting a selection of pages from a workbook. The selection is determined by the following

[Code].....

The value in B47 will either be a 0,1,2

2 - selects minimum range, plus two additional sheets
1 - selects minimum range, plus one additional sheet
0 - selects minimum range only.

the code is:

[Code] .....

after which point a pdf is generated.

View 13 Replies View Related

Trying To Sort All Pages In Workbook With One Macro

Nov 30, 2011

Trying to create code that will sort data in mulitple worksheets in a workbook.

Here is the code I have... I am being shown on "object required error"

Dim sh As Worksheet

For Each sh In ActiveWorkbook.Worksheets
If IsError(Application.Match(sh.Name, _
Array("Drop-down lists"), 0)) Then

[Code] .........

View 9 Replies View Related

Find And Replace Across Multiple Pages In Workbook?

Apr 1, 2012

Is there a way to do a "find & replace" across multiple pages in an excel workbook?

I am trying to update 1 particular data-set, and need to do it across all my pages...just spent 30 minutes doing find & replace on each page.

View 4 Replies View Related

Select The Print Area For Several Pages In A Workbook

May 8, 2007

I've set up a short bit of code to select the print area for several pages in a workbook, but have no idea how to get the code to "activate". I tried placing a command button on a page to activate the code, but for some reason it won't see or act upon any sheets outside the sheet the command button is on. Same goes for the "event" proceudres on pages (activate, change.selection, etc).

View 9 Replies View Related

Get The Range Address Of A Dynamically Named Range That Refers To A Formula In VBA

Aug 10, 2008

I have a named range that expands and contracts based upon the amount of data that is in some column. Call it AllData_UsedRange.

I have another named range that actually refers to a range. Call it AllData.

Column A
Row2 56
Row3 44
Row4 65

AllData is a named range that refers to the range A2:A65536
AllData_UsedRange refers to A2:A4 by way of this formula.
=OFFSET(AllData,0,0,COUNTA(AllData))

How to I obtain an address of AllData_UsedRange in VBA code?

These do not work...
ThisWorkbook.Names("AllData_UsedRange").RefersToRange.Address
Evaluate(ThisWorkbook.Names("AllData_UsedRange"))

View 9 Replies View Related

Writing Formula In Cell Using Vba?

Apr 8, 2014

I have a reference written as a string in cell "AS4", the string is results!A4

I want to write that same reference in cell "as5". I have written the following

[Code] .....

However, cell "as5" returns the string as =results!'A4', with single quotes around A4

Therefore the reference isn't working.

View 2 Replies View Related

Writing A Formula To Cell

Jul 20, 2006

Until now, I have been using the terrifically inefficient way of writing in a formula in a cell and copy pasting the value in my VBA

Easy example (concatenating):

Sheets(Sheet2).Select
Range("D1").Select
ActiveCell.FormulaR1C1 = _
"=""Data collected on ""&TEXT(NOW(),""dd/mm/yyyy"")&"" at ""&TEXT(NOW(),""hh:mm"")"
Range("D1").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False

More complex example (with IF statement):

Range("D2").Select
ActiveCell.FormulaR1C1 = _
"=IF(LEFT(RC[-3],13)=""No list found"",""Data requested for ""&update!R[2]C[-1]&""/""&update!R[2]C&""/""&update!R[2]C[1]& "" out of range"",""Data downloaded for ""&update!R[2]C[-1]&""/""&update!R[2]C&""/""&update!R[2]C[1]& """")"Range("D2").Select...............

View 4 Replies View Related

Writing A Number After The Formula For A Cell

Aug 17, 2007

I have a cell in which I use the following formula:

View 13 Replies View Related

Writing Formula In Dynamic Number Of Cells?

Feb 13, 2014

I'm trying to create a "master file" that can be used later (a tool other uses can pull up) on with datasets of varying size. I'd like to "data dump" a table of individuals with subsequent columns of various characteristics, then automatically compute various things. So then a user can dump their data into my file and "get the answer" immediately. I've seen some stuff on running one calculation on a dynamic number of cells, but let me illustrate why this is different. I want to perform a dynamic number of calculations, see below:

Each row (record) is a person, with some characteristics (numerical). Ultimately I have a few columns on the end with some computations (Excel formulas) I'd like to do. I'd like to do this for each person (that is, each row) in that data that I dump in. But the thing is, ahead of time we don't know how many people will be dumped in, and that changes (because I'd like this to be a tool...). So how do I tell Excel to compute things if there is a person in that row, but do nothing and leave cells blank if there isn't a person? Ideally I don't have millions of ifs testing for blank cells either. I'd like to do this with Excel functions only and not VBA, if at all possible.

View 1 Replies View Related

#NAME- Error Results When Writing Formula To Spreadsheet From VBA

Apr 25, 2006

When I am writing a formula that includes a lookup, it returns the # NAME? error in the spreadsheet. If I delete the trailing ), retype it, and hit enter then the formula returns the correct value. How do I get the formula to work correctly as it is written to the sheet from VBA!

Here's the line of code that writes the formula to the worksheet:

TBox.Range("A3").Offset(i, 3).FormulaR1C1 = "= ROUNDUP((8-(VLOOKUP(RC[-3],K:L,2,FALSE)/1.2))/RC[-1]*1.2,0)"

View 4 Replies View Related

Excel 2007 :: Copying Word Pages To Workbook To Calculate Numbers By Using Formulas

Apr 10, 2013

I am working on word documents that has financial numbers on them. I am copying word pages to excel to calculate the numbers by using formulas and etc. I will cut to the chase; is there a way or a macro to insert into an excel template workbook(.xltx) when we open the template there will be a command button to select the word document (which we want to copy its pages) to excel sheets. When a new page begins a new sheet will be created and the page will be pasted on the new sheet.

It is not important if it has to have a command button to select the word document it is ok to run the macro and select the word document and it does not has to populate sheets according to length of word document (I can create lost of free sheets on the template)

The main idea is to gain the time I spend on copying the word document to excel sheets. Some documents can be very long (100 pages). I am using MS Office 2007.

I triend to export data but excel does not allow me to select word documents.

View 5 Replies View Related

Question With Writing A Formula That Can Pick Out Words With 3 Letters

Jan 8, 2009

I have a question with picking out certain word in the column. I am trying to write a formula that would allow me to pick out names that has first 3 alphabetical letters from the columns. The column has a lot of different names, but the one that I would want my automation to pick out is similar to this, C, AR, AA-103, BG-2056, HJE-1100, etc. However, in the same column, I have other words like elevtar, hsvte, lvnrm, etc. that I do not want my formula to pick out.

View 9 Replies View Related

Formula Only Returns Values If The Pages Are Open?

Jul 9, 2014

i have a workbook that draws numbers from other workbooks.For some reason every time i close and reopen it the fields are blank.I have to go in and open each workbook for the cells to populate.

View 1 Replies View Related

Macro Won't Execute Code To Put Focus On "print To X Pages Wide By X Pages Tall"

Feb 20, 2009

I'm trying to execute a macro and it won't put the focus (radio button) to select x pages wide by x pages tall in the Page Setup/Page/Scaling Area. I looked at the macro and can't find a setting in the code but yet the focus won't change. What can I do about this? In other words the radio button stays selected as "adjust to "" % of normal size. Here's the code...

View 2 Replies View Related

Writing Formula To Calculate Monthly Returns Based On Annual Growth Rate

Jul 10, 2014

I have a model that makes projections based on annual growth rates. However, I need to evaluate the data based on monthly intervals. With an 8% return on an investment of $1,000,000 my ending balance at the end of the year should be $1,080,000 and in year 2 it would be $1,166,400 and so on. In order to evaluate the monthly data I need each month in year 1 to be based off $1,000,000, so it would be 8%/12=.006666% or $6,666.66 per month. The next year would be based off $1,000,000 + (6,666.66*12) = $1,080,000 and each month would be $7,200.

writing a formula to evaluate over 360 periods.

View 5 Replies View Related

Print Entire Workbook Prints Pages Out Of Order And Makes Several Print Jobs?

Mar 26, 2013

All sheets are basically the same except some minor values, names and addresses. There is one page per sheet and all pages are in portrait format. The print preview shows all the pages in order but when I print it, it makes multiple print jobs of 1 to 2 pages each and prints them all out of order. I don't know why it is splitting up the workbook or why it changes the order. I print and reorder these weekly, which is a major pain. It comes out in the same order each time but it is the wrong order.

View 1 Replies View Related

Userform Refers To Textbox?

Jun 20, 2014

I'm having a problem referring to the value in my text boxes. I'm trying to refer the value in those to certain columns and rows that will be deleted after.

[Code]......

View 7 Replies View Related

Refers To A Dynamic Named Range

Jan 13, 2010

My file has a code that refers to a dynamic named range. When I run the macro that range gets corrupted and I cannot figure it out why. before the macro the named range refers to:

=OFFSET(Manager!$A$1,0,0,MATCH("*",Manager!$A:$A,-1),3)

and right after I run the macro it turns to:

=OFFSET(Manager!#REF!,0,0,MATCH("*",Manager!$A:$A,-1),3)

View 2 Replies View Related

Lookup With 2 Refers And 2 Data Ranges

Dec 2, 2009

I need to put a formula which will show me required quantities under a relevant date which is already calculated in an aside table.

In the cell E8 I want it to look up for A8 in the table A35:AR45. Then in that row to find a date which is exactly the same or smaller than E7 and bring up all summed quantities from the table A50:A55 (quantities summed must be in the same column where the relevant date was found and in the row where the requirend part number is).

In the other hand I need to doin the cell H8 to llok up for A8 in the ableA35:AR45. Then in that row to find a date which is exactly the same as in H7 and bring up all summed quantities from the table A50:A55 (quantities summed must be in the same column as the relevant date was found and in the row where the required part number is).

View 3 Replies View Related

Copy From 'Refers To' In Defined Names

Sep 22, 2006

This thread is related to this thread. Offset, Match, Max Formula In the Insert - Name - Define window:

If one wants to copy a formula from the "Refers to" box and the formula extends past the right side of the box, how does one use "select all" or mark the whole formula from beginning to end so it can be copied without messing up the formula. At the moment, when I try this, it changes the formula to include the active cell of the worksheet that's open when I use the Ctrl + c etc. I have tried Ctrl + Ins and Ctrl + a and Ctrl + c. None of these are working for me.

View 8 Replies View Related

VBA ListBox - AddItem Refers To A Range Within Sheet1

Mar 22, 2012

How I change the code below so that the ."AddItem" refers to a range within Sheet1?

For example .AddItem Worksheets("Sheet1").Range("O2:O20")

Code:

With ListBox1
.AddItem "January"
.AddItem "February"
.AddItem "March"

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved