Variable Cell Range

How do I use variables to define a cell range?
I have a series of data elements that are organized by date. I need to find a list of dates when specific events have occurred (each event is marked by a flag value of 1). I'm using VLOOKUP to find the first date when the event occurs. For the next date I need to adjust the cell range I'm searching so that it won't pick up the first occurence of the flag value (1).
Example:
1st query =VLOOKUP(1,G3..G223,51,0)
The first query returns a date that is in row 12. I now need to make the second query look for rows 13 through 223.
Overall I need to create over 500 such queries (50 columns of data and 10 events in each row), so typing in each query individually is not an appealing option.
Thanks!

Hi Dad,
I'm having some trouble with your description of the data table. If I read it correctly, the cells in column G contain either a 1 or are empty (or contain a zero). If this is correct, and you are using column G to hold the compare range, then, as the VLOOKUP description in AppleWorks Help states, "If the values in the compare range are not in strict ascending or descending order, or the compare range does not contain an inclusive range from the highest to lowest possible value, the results can be unpredictable." It's very difficult to place the values 0 and 1 into 221 individual cells in "strict ascending order."
VLOOKUP(v,cr,os,m) looks for a specific value (v) in a strictly ordered list of values (cr), and when that value is found*, returns the value in the cell that is in the same row and offset a specific number of columns (os) to the right.
*The method of comparison (m) determines whether an exact match is necessary or if the comparison can be <=v or >=v.
•From the Compare range in your formula, your table has 221 rows (3 through 223). My assumption is that you are recording data for 221 specific dates.
•From the offset value in the formula (51) the table has 52 columns—a compare range column, a result column, and 50 others between them.
•From your formula, it appears that only one column of the chart is being used as a compare range for a particular search (event?).
•You state you have 50 columns of data and that there are 10 events in each row (of 52? cells).
From the last statement, I infer that there are 50 distinct possible events (one for each column), and that 10 of these 50 events occur on each date. Is that correct?
If I understand the description, then my impression is that VLOOKUP is not an effective tool for this job.
Instead, I would suggest a larger table and a set of formulas which will construct a list of the dates on which each event occurs. (Note that the maximum length of a formula, and the maximum length of data for a single cell are both 255 characters. This may necessitate some adjustment to the formulas if one event occurs a great number of times.)
The larger table will consist of two (or three) sections:
•a data entry section much like my understanding of your current table. One column will contain a list of dates. Fifty other columns will each represent a single type of event. Each cell in that column will contain a 1 if the event occurred on the date listed in that row, or will be empty if the event did not occur on that date. for illustration purposes, the dates will be listed in F3..F223, and the events in columns G..BD, with the occurence of Event 1 reported in G3..G223.
•A calculated section which copies the contents of the data block, substituting the correct date for each occurrence of a 1 in the data. In this block (BF3..DC223), column BF will list the dates on which event 1 occurred, column DC the dates on which event 50 occurred. Row 2 (or Rows 1 and 2) in this secton will repeat the headers in the data entry section.
Formulas:
BF1: =G1
Fill this formula Down and Right to DC2
BF3: =IF(G3=1,=DATETOTEXT($F3),"")
Fill this formula Down and Right to DC223
Collecting the dates:
Open a new Word Processor document.
For EACH event, switch back to the spreadsheet document, select the full column containing the dates for that event (eg. BF1..BF223 for Event 1) and Copy.
Switch to the word processor document and Paste, then press shift-return twice (This enters a visual separation that will not be removed in the next step.)
Save the (temporary) WP document. You will have to name it the first time. After that, just press command-S. (This gives you a fall back if you make—and notice—an error along the way.
Repeat these three steps until you have transfered all 50 columns of data (including the empty cells in each column) into a single list in the WP document.
Now use Find/Change to remove all of the empty lines in the list.
Press command-F to open the Find/Change dialogue.
Type "\p\p" into Find and "\p" into Change (both without the quotes).
Repeat the next three steps until AppleWorks reports "0" occurences were changed.
Click Change All.
Click OK to acknowledge the warning that this action is irreversible.
Read the number of changes that occurred, then Click OK to close this alert.
You will now have a single column list of each event, followed by the dates on which it occurred. If you want to show this list as a table (in a spreadsheet), Select and copy each section Event and dates it occurred) individually, switch to the spreadsheet, click on the cell where you want that column of dates to begin, and Paste. Repeat.
It may be possible to automate this last part, either through a further section in the spreadsheet, or through the use of an AppleScript to collect and organize the calcualted data.
Regards,
Barry

Similar Messages

  • IOS5.0.1 constant error "iPhone can not make or receive calls.  Restore from iTunes":  I get this message and the phone will no longer work (happend once while on airplain mode and now once while in wifi only area, out of cell range).  help!

    All- I get this message ("iPhone can not make or receive calls. Restore from iTunes" (happend once while on airplain mode and now once while in wifi only area, out of cell range)). iPhone 4.  Newest OS.  Never happened with old OS! Cycling phone on/off does not help.  Ignoring message causes phone to cycle off then on.  After first time this happened, I restored.  Six days later...same problem!  Clearly a new fix is necessary.  Suggestions? 

    I have not tried that...I will look up the process so that I can do it correctly (and still transfer all of my files, contacts, etc).  Any suggestions?  What is the advantage of restoring as a new device..is this more akin to a complete wipe of a hard drive?

  • Using Bex query through Query Browser - add result set to Cell range?

    Hi all,
    I have up to now used Xcelsius on NW with BICS connection towards BEx queries.
    When I use this connection via Data Manager in Xcelsius, I'm able to use the Cross-table functionality to insert my entire dataset into a cell Range.
    But now I have an requirement to save my Dashboards on the BO server, so I need to go through Query Browser to extract data from SAP BW to my Dashboard.
    When inserting the query in the Query browser and I want to assign the data to Excel ranges, it seems like I need to do this for each individual Infoobject and Key Figure. Since I have many Key Figures (30-50), this is a lenghty process.
    Is there a way to insert the entire dataset from Query into a cell range (both rows and columns), or do I need to do this for each Key Figure as indicated in the screen shot above?
    --> I know that the Query Browser flattens my cross-table from the Query, but still, it should be possible to avoid to input all my Key Figures (30-50) individually to corresponding cells in my Excel part of the Dashboard.
    regards
    Oddmar Lid
    asdfasf

    Hi Oddmar,
    If you want to display the data retrieved from the query you could map the data using the Query data.
    Pull scorecard component (for example) and in properties if you see the Display data click on the dropdown and select Query data.
    Hope this helps !

  • Type in a cell range

    This is probably the worst spreadsheet program in the history of man.  How the **** do you type in cell ranges in this daffy thing?

    fcarlson,
    I am curious... how would you expect to enter a formula?
    Numbers is definitely light weight in many areas, no doubt.  You can provide feedback, if you care to, by selecting the menu item "Numbers > Provide Numbers Feedback"
    I do disagree with your statement "This program is totally ********. "  solely because you paid $0 for it.  There are other free programs like LibreOffice that are more excel-like.  Keep trying Numbers you may like it I say.  you could try it in a box with a fox.  In a house with a mouse.

  • Creating "the token representing the cell range"?

    Reference: http://help.apple.com/numbers/mac/3.2/#/tan727173a8, "Preserve row or column addresses in formulas".
    "Click the triangle on the token representing the cell range you want to preserve.
    " - end of quote.
    Where in this help manual can I find where to call a cell range "Number of Guests"?
    All the other token references are about cell formats.

    Mel,
    select the range of cells:
    The range "token" is the blue, rounded, highlighted text "C2:C10".  The triangle you should click is just to the right of this text.

  • Single Cell Copy to Cell Range

    If I create a cell value/formula, then copy that cell, select a range of cells, and paste, in Excel it copies the source cell contents to all cells in the range (adjusting relative references in a formula). In Numbers, it copies only to one cell in the range. Having to paste one cell at a time is agonizing, and this operation is something I do all the time in editing an existing spreadsheet.
    The only alternative I see is to copy one cell to two, then select a two-cell range to copy and paste etc in geometric progression. Is there something simple I'm missing?

    I did a search in the help for "fill" & got this:
    Here are ways to autofill table cells:
    To paste the content and fill of a cell into adjacent cells, select the cell and then drag the Fill handle in its lower right corner over the cells into which you want to paste. You can drag to the right to add values to adjacent cells in the same row, or you can drag down to add values to adjacent cells in the same column.
    Any data, cell format, formula, or fill associated with the selected cell is pasted, but comments aren’t pasted.
    If the selected cell contains no data, autofilling clears data from target cells.
    You can also add values to cells based on value patterns. For example, if a cell contains a day of the week or a month, you can select the cell and then drag to the right or down to add the next day of the week or month to the adjacent cell.
    To create new values based on numeric patterns, select two or more cells before dragging. For example, if two selected cells contain 1 and 2, the values 3 and 4 are added when you drag through the adjacent two cells. And if two selected cells contain 1 and 4, the values 7 and 10 are added when you drag through the adjacent two cells (values are incremented by 3).
    This is similar to how I've done fill down or fill right in AppleWorks, so I think the relative references would copy.

  • Assigning value to variable within Range

    The Problem:
    Range of values permitted is 10 < x < 30. x starts at 20. Variable x increments by 5, on a button click, until it reaches 30, at which point it should decrement by 5, until it reaches 10, before moving up the range again... and so on.
    I'm sure this is quite simple, but it's been bugging me for hours... the following simple increments by 5.
    How would I include range constraint. please some help.
    void jButton_mouseClicked(MouseEvent e) {
    int r = aBall.radius();
    aBall.rad = r + 5;
    repaint();
    }

    You're right, perhaps, nasch_.
    When I was starting out, I learned a lot from looking at code and then figuring out how to adapt it. Perhaps I have denied the OP this opportunity.
    To learn more from the code I posted, OP, don't just copy and paste it. As nasch_ was pointing out, you absolutely must learn how to translate requirements in English (or language of your choice) into code. If-statements ar crucial elements. Look at the code and figure out how it matches your requirements. Think about what you have to do logically - When the size would be less than 10, you need to grow instead of shrink... etc. Write out (or at least think out) every scenario that your code has to react to. Size would be in range, size would be too large, size would be too small, ball is growing, ball is shrinking, etc. Make every possible combination and figure out how you must react.
    When your logic is hammered out like that, in natural language, start converting to logic. You see that your code has to remember whether your Ball is growing or shrinking. Your Ball should know it's minimum and maximum size (which my code ignores, making it less flexible). Turn your scenarios into If-statements. Your first code could have way too many If-elses, but get it to work, and then refine it by combining and nesting statements.
    Don't ever just copy and paste code. You won't learn how to do anything yourself. Learn from code you see. Take this opportunity to not just solve the immediate problem, but to realize that this is an area of your skills that needs improvement and follow through on improving it.
    -- end soapbox

  • Need help on OLE excel paste in selected cell range

    Hi Friends,
    I need to paste the clipbord contents in a selected range of cells using ole automation.
    Rage is selected using the following code :
    CALL METHOD OF G_EXCEL 'Cells' = G_CELL1
        EXPORTING #1 = 4
        #2 = 1.
      CALL METHOD OF G_EXCEL 'Cells' = G_CELL2
        EXPORTING #1 = P_ROW
        #2 = gv_col.
      CALL METHOD OF G_EXCEL 'Range' = G_CELLRANGE
        EXPORTING #1 = G_CELL1
        #2 = G_CELL2.
    now need to past the clipbord contents in G_CELLRANGE.
    Would appriciate your help,
    Thanks,
    John

    Hi Jhon,
    this is the obsolete old way even Rich would not recommend (look at the age of the blog).
    There are far better and much more performat ways doing this using Desktop Office Integration.
    Refer to this complete documentation of [Desktop Office Integration (BC-CI)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf]
    It took me some time to create my first application with DOI, but if you have done you will never want to miss it.
    Regards,
    Clemens

  • Set the name of cell or cells' range for a report and when export it to excel the names will be defined.

    Hello,
    I have an C# application that exports report from Reporting Services to Excel files.
    I would like to know if there is a possibility to set the name of the cell or range of cells in the report (via Report Builder or somewhere else) and when open the Excel the names are set. Similar functinality when you open the Excel and go Formulas/Define
    Name and set the name for a unique cell or range.
    Regards,

    Hi there,
    I don't believe this is possible in Reporting Services.  One workaround, if you don't know the exact range at runtime, might be to put hidden characters (white?) in your sheet at start and end of range, then do some postprocessing on the file using
    VSTO or perhaps a 3rd-party tool like this one.  
    http://www.aspose.com/reporting-services/excel-component.aspx
    If you do know the range it should be much easier.
    cheers,
    Andrew
    Andrew Sears, T4G Limited, http://www.performancepointing.com

  • Variable with range- only 1st value used in manual planning ?

    Hi,
    We're trying to define a column in a manual planning layout that will represent a YTD total.  We have defined a variable  for 0fiscper that contains the range of periods we require in the YTD total.  When we execute that manual planning area with this variable used as a restriction on the data column we want, the key figure values displayed only represent those for the 1st period in the range - not  all periods in the range !
    I'm hoping someone can tell me if manual planning layouts can use variables in this manner.  If not, how can this best be done ? 
    Many thanks,
    Blair

    Hi Blair,
    Create a total column using the dynamic column, as a result you would have the individual period columns and the total column in the layout. Now make the individual period columns hidden using any of the options below.
    You could achieve the same, by making the column hidden in the transaction UPX_MNTN
    > Enhance Planning Layout
      > Select the relevant layout
         > Select the enhanced button for the key figure
           column
           > Mark the hidden check box there.
    Alternatively if you are using Excel GUI, you could set the column width of the columns preceeding the total column as 0 (in the third screen of the layout) to make them hidden.
    Hope it helps

  • Using Substitution variables in Range function in FR

    Hi,
    According to one of my report requirement, I want to show current quarter’s weeks till the current week. Just to elaborate more I am able to show current quarters all weeks but unable to show till current week. I had created Current quarters starting week (CurrQtrSW) as a substitution variable and CurrWeek as other substitution variable when I keep these two SV's in Range function it is throwing me error and my report is not running. Can anybody help me in this?
    It is urgent
    Thanks in Adv.

    If you're using the standard 13 week quarters and they are labeled that way, you can just use Week1 as the starting point (as opposed to having weeks 1-52 in your essbase cube).
    Have you restarted essbase/FR Studio since adding the sub vars? It can sometimes require one or both to fully recognize them.
    Hope this helps.
    Cheers, Iain

  • Tex variable: Cell Function with 2 time characteristics?

    Hi BW experts,
    I have to use cell functions in our query because of cell references in the definition.
    There are two time characteristics used in the query:
    <b>0calweek</b> for reporting horizon and <b>zcalweek</b> for week of data loading
    Also I have text variables in the structure for displaying cal week (10.2007 for example). However, the text variables can't be displayed correctly. I assue the reason is we have 2 time characteristics for cal week.
    Does anyone have the same experience? Is there any workaround to resolve this delima?
    Thanks for your help in advance!
    Regards,
    Sally

    Hi Olivier,
    many thanks for your feedback and help!
    1. zcalweek is not referencing 0calweek ;-(
    2. in the cell, I have to restrict the KF with two values:
       one is the reporting week (<b>0calweek</b>), for example 17.2007.
       the other one is the week of data loading (<b>zcalweek</b>), for example 10.2007.
    the text variable should be displayed with the reporting horizon (0calweek).
    If I unerstood correctly from your message, there is no workaround for my problem?!
    thanks for your further inputs.
    Regards,
    Sally
    P.S. now the text variable is shown as &var&

  • Problem with BW exit variable on range of dates

    Hi everyone:
    I have a problem with exit variables in BW, the scenary is following:
    I need to generate a ratio MTD (month to date, i mean, first day of the month to actual date), for this, I enter a date by keyboard, for example 31.12.2010 and BW must return the range 01.12.2010 - 31.12.2010. The problem is what BW returns: 31.12.2010 - 31.12.2010, i mean, repeats the same date entry by keyboard.
    For this porpuse I have a variable of interval type called "ZCALDAY" on infoobjeto 0CALDAY, and  exit variable of interval type called "ZRANGE", the code in CMOD is the following:
    DATA: L_RANGE         TYPE RRS0_S_VAR_RANGE,
                L_P_RANGE   TYPE RRS0_S_VAR_RANGE,
                L_S_RANGE   TYPE RSR_S_RANGESID.
    when 'ZRANGE'.
         BREAK-POINT.
         IF I_STEP = 2.
           CLEAR l_s_range.
           READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'ZCALDAY'.
           CONCATENATE loc_var_range-low(6) '01' INTO l_s_range-low.
           l_s_range-high = loc_var_range-low.
           l_s_range-sign    = 'I'.
           l_s_range-opt     = 'BT'.
           APPEND l_s_range TO e_t_range.
        ENDIF.
    I doing Something wrong with the variables definition or on the  code??
    I hope you can help me....
    Best regards!!!!
    Cesar.

    Thanks!!
    I think the problem is other, I check the RSRT transaction and the range is calculated ok, i mean, the range generated is 01.12.2010..31.12.2010.
    But the query does not show the data corresponding. the query shows the values of the day 31.12.2010.
    The interval are not restricting the key figure...
    I used the variable exit "ZRANGE" on the key figure restriction and the variable ZCALDAY in the filters section.
    Maybe, the variable definition is wrong (variable ZCALDAY and exit variable ZRANGE)
    Thanks!!!

  • Applescript. Select cell range and copy to clipboard

    Hi everyone,
    I have been looking at trying to select a range of cells, eg B1 to H40, once selected I would like to copy the selection to the clipboard.
    I am having difficulty selecting a range of cells...
    any help would be very much appreciated.
    Many thanks
    Phelix

    Prepend my original suggestion to Jerry's and you have what you want:
    Make the Summary table reference only that data you want in your summary:
    select the table
    <JERRY'S SUGGESTION>
    Command-C (Copy)
    Switch to Preview
    Command-N (New document from Clipboard)
    Command-S (Save)
    </JERRY'S SUGGESTION>
    another way to to place the summary table in another sheet.  Then you can just print that sheet to PDF by selecting the sheet, then select the menu item "File > Print…", then the option in the "PDF" menu at the bottom right:

  • TableStyle Pro not retaining worksheet and cell range information for Excel Links

    I just started working with TableStyles Pro and CellStyles Pro. I am already running into some limitations that I think there are solutions for. The main thing I have encountered is I have a price list file set up in InDesign CS2 for Windows linked to a single Excel file, but different worksheets and named ranges within those worksheets. I have looked into the settings, etc. required to update the Excel data without losing your formatting, but when I update the link it uses some sort of default settings and links to the first worksheet and ignores the worksheet and named range information I had entered when I initially linked the file. I noticed that the links palette only shows the name of the Excel file and doesn't indicate specific sheets or ranges.
    I would like to not have to work around this by separating my Excel file because it would create so much more work when updating the pricing information and having to copy and paste formulas between files, open them all and save them all. I also would like to avoid working around by relinking instead of updating the links as I would have to apply some formatting that is not covered by the TableStyle and CellStyle plugins.
    I hope this issue is just a matter of some sort of setting and I will not be stuck with a work around solution. Please help.
    I did stumble across a posting about another plugin that supports more complex formatting tasks, but I am not sure even this will solve my reformatting issue as it sort of changes from table to table in some cases.

    I may be changing the subject, but I wonder if it is possible to link the cell in InDesign CS (WindowsXPpro) table to a cell in Excel.
    Scenario: I have 100's of tables in our catalog which contain part#, description, and price columns. I want to be able to tell the price cell to go to Excel and bring back the correct price. I can easily do this in Excel and then simply place the whole spreadsheet into InDesign, but I would need to recreate all my tables in Excel. It would be much faster to simply create links from cells in InDesign to cells in Excel.

Maybe you are looking for

  • What's wrong with my code? compliation error

    There is a compilation error in my program but i follow others sample prog. to do, but i can't do it Please help me, thanks!!! private int selectedRow, selectedCol; final JTable table = new JTable(new MyTableModel()); public temp() {      super(new G

  • 2 airport expresses working together

    Can anyone help? What are the exact steps to connect two airport expresses to work together? I need to extend the range as I use my powerbook very far away from 1st airport express and having signal problems. Many thanks John

  • Connect 2 BW to the same client in R3?

    Hi,     Is it possible to connect 2 BW to the same client of R/3 as a source system? Will this mess up the delta queue like in RSA7? Or, the R3 system has separate queue for each BW? Please advise. Thanks, Jeff

  • Lightroom Problems

    I discovered I had problems this morning. I edited the mornings images with only the usual problems which are that I usually get shut down 3 or 4 times per batch with by an unknown error message. Then I went back to finish editing some shots from las

  • Standalone Python client for recent versions of MaxDB / Python?

    Folks; I remember seeing some Python related things coming with the MaxDB installation, as well as I remember having a separate bundle of code to make MaxDB accessible from within Python available with earlier versions. However, simply trying to use