Output From Sub To Spreadsheet

Feb 18, 2008

I have a function which either looks up a value on a spreadsheet or runs a sub. If it runs the sub, it should generate a list of figures which are output to a spreadsheet.

My function keeps crashing but I have found by stepping through it that is correctly decides whether to lookup a value or run the sub. It starts the sub correctly but when it comes to outputting information to the spreadsheet it crashes. I have lx_calc set as an array and I am using the following to output to a spreadsheet (lx_calc(20) is defined as 10000 and ImpFac and qx have already been calculated):

For i = 21 To 120
lx_calc(i) = lx_calc(i - 1) * (1 - (1 - ImpFac(i - 1)) * qx(i - 21))
Workbooks("Macro Ann Addin.xls").Worksheets("Mbr").Cells(i + 1, 1) = lx_calc(i)
Next

I can't see why this doesn't work unless it is just that it doesn't like the fact it is looking at an array.

View 9 Replies


ADVERTISEMENT

Spreadsheet - Output Choices / Multiple Dropdowns In Sequence

Mar 14, 2014

I am looking to create a spreadsheet wherein the user can choose multiple drop downs in sequence and then have it output each choice to a template or empty space within the spreadsheet.

For example, lets say column 1 said what is your favourite colour and had a dropdown with two choices red and green. Column 2 says "favourite place" and had a drop down with two choices "London and USA". Then once the user chooses an answer in each column it would output these choices to notepad or a large space within the spreedsheet.

In this example it would output:

"Red
London"

if the first two answers were chosen from each column. Obviously it would be a much larger scale than the simple example above.

View 1 Replies View Related

Formula To Have Spreadsheet 2 Pick Items From Pass / Fail Column On Spreadsheet 1

Jan 23, 2012

Workbook 1 has 2 spreadsheets. Spreadsheet 1 contains Item and Pass/Fail Columns. under the item column is the serial number of the item tested. the Pass/fail column has the serial number duplicated if it failed tested. what is the formula is to have spreadsheet 2 pick the items from the pass/fail column on spreadsheet 1?

View 4 Replies View Related

Multi-Spreadsheet Formula Down To Populate The Other Cells In The Total Spreadsheet

Jan 4, 2010

I have attached a document paralleling a document I am working on. The dollar amount in each spreadsheet represent sales. I have entered in values into the candy, soda, and chips spreadsheet. I have also linked values for candy into the total spreadsheet. My question is can I somehow type something or drag the formula down to populate the other cells in the total spreadsheet?

The idea I am thinking but which I don't know how to implement is to list all the items (as in column G) and list all of the relevant cells (e.g. B1 in the Candy spreadsheet) as in columns H and I (Note that all items will have the same cells but the cells will have different values...e.g. all three items have a cell B1 and B2 in their spreadsheet but these cells contain different values). I then try and fail to create a formula in cell B3 of the Total spreadsheet. I am trying to create a formula of the following nature:

='(Spreadsheet Name From Column G)'!(Cell Name From Columns H and I)

The Second half of the formula doesn't really concern me (i.e. the cell name from column H and I). However I am perplexed as to how to achieve the goal in the first parentheses above.

View 4 Replies View Related

Select Data From Spreadsheet Column If Condition In 2nd Spreadsheet At Same Time Is Met

Aug 11, 2013

I have two spreadsheets, one gives me the beginning and end of civil twilight as a measure of day vs. night. The spreadsheet has Date/Time in the first column, and the value 45 in the 2nd column when it is night. The second spreadsheet has also 2 columns with date/time and body temperatures of a squirrel. I want to get basic statistics (mean and standard deviation) of the squirrel's nocturnal body temperature, that is for times when it is night (value 45). The tricky part is that Date/Time of both spreadsheets are different. The procedure has to recognize that the date/time of body temperature lies between the beginning and end of the value 45 blocks of the first spreadsheet.

files: twilight sheet squirrel temperature

View 6 Replies View Related

Spreadsheet That I Have A Lot Of Macros That Are Attached To A Customized Toolbar Saved In The Same Spreadsheet

Jun 26, 2008

I have a spreadsheet that I have a lot of macros that are attached to a customized toolbar saved in the same spreadsheet. I saved this is a read-only file. When I open as read-only and run my macros (testing), I save it as another file. When I then open the "template" to do the same thing, the toolbar/buttons now reference the file I previously saved as something else. Help please? Is there a macro that would delete all macros before saving the file as something else?

View 9 Replies View Related

Merge Files? (add Data From One Spreadsheet To The Appropriate Places On Another Spreadsheet)

Feb 6, 2009

Often I need to add data from one spreadsheet to the appropriate places on another spreadsheet. For example:

Sheet A has 10,000 records with these fields: id#, name, address, place of employment.

Sheet B has 5,000 records these fields: id#, GPA, college major, type of degree.

Some of the records in B contain information for the same id#'s as sheet A. I want to add this information together so that a Sheet C will have these fields: id#, name, address, place of employment, GPA, college major, type of degree.

View 3 Replies View Related

Copy Certain Cells From 1 Spreadsheet To Other Spreadsheet Depending On Condition

Jan 13, 2010

I have noticed that the basic problem I have is a common one on this forum with different varibles for different people. I have attached a dummy copy of the spreadsheet that I am using.

I need to copy cell information for one spreadsheet to one of 2 other spreadsheets depending on a dropbox condition. The master spreadsheet is the Issues spreadsheet, and depending on whether the user chooses Transferred Complaints or Transferred Offences (in Column K) I need to transfer certain cells to the Complaints or Offences spreadsheets.

The information I need to transfer from Issues is: .....

View 13 Replies View Related

Get Totals From One Sheet In Spreadsheet To Show On Another Spreadsheet?

Apr 7, 2014

I have 2 sheets in my excel spreadsheet. One tracks data for a number of projects five different employees are working on. The other sheet is where I want to total up the number of minutes each employee has worked on their individual projects. I tried writing an IF statement like below but I am only getting the total in the first field even if the employee's name is not Employee 1....

[Code] .....

How I can write this so their totals show up in the correct row?

View 3 Replies View Related

How To Auto Populate From Main Spreadsheet To New Spreadsheet

Mar 11, 2012

I have a Main Customer Spreadsheet. I want to Auto Populate FROM the Main Customer Spreadsheet to a New Spreadsheet. I want to be able to key in a customer name on the New Spreadsheet and take the info for that customer from the MAIN Spreadsheet and fill in the blanks. I need to be able to do this several times a day.

View 3 Replies View Related

Spreadsheet To Note Book And Back To Spreadsheet

Apr 14, 2007

It also renames the CommanBarPopop with the new filename.This allows the user to open both Projectworkbooks/files (If required) and load each CommandBarPopup for different filenames .Therefor opening the Userforms and worksheets for the CommandBarPopup clicked ...

View 9 Replies View Related

Compare Before Spreadsheet Data To After Spreadsheet

Apr 2, 2014

Wondering if there is an easy way to compare 2 spreadsheets that should have identical data on them? The first spreadsheet (Before) has the output data from 'before' a code fix was applied. The second spreadsheet (After) has the output data from 'after' a code fix was applied. The spreadsheets have 7 columns of data and almost 500 rows.

I've already copied the data from the source datasets provided by my IT folks into Notepad (.txt) files and then used Excel to open them as fixed width spreadsheets. I have 1 workbook with 1 spreadsheet with 'before' data. And, I have 1 workbook with 1 spreadsheet 'after' data. And, I have another workbook that contains both worksheets. So, I'm ready to go whenever I get hints of what to do next. :-)

I need to be able to show my client that we did not impact the data with the code fix that was applied. I want to be able to show my client contacts (business folks) an end result via Excel that confirms that I actually compared the 2 sheets and there were no differences. In other words....I can't just show them a formula with '0' as it end result (even tho that's basically what I'm trying to prove).

View 6 Replies View Related

Importing Data From Spreadsheet To Spreadsheet

Apr 24, 2006

I need to write a macro that will import data contained in another spreadsheet, but am unsure how to do this. I have several (about 15) spreadsheets that contain data. I need to import key bits of this data into one central spreadsheet that will be used for reporting purposes. I only need 2 cells worth (values) from each source spreadsheet, to be pasted into the destination spreadsheet, into designated cells.

The source spreadsheets are usually closed down and kept on a file server, which my PC has access to. Ideally I want to activate this macro with a control button - i.e. I press the button once and the macro goes off and collects/updates each field with the latest data stored in each of the source spreadsheets.

View 7 Replies View Related

Output Will Look As 0 Instead Of 10

Jul 4, 2009

I seem cannot get the code right, see below.

Cell: A3= Week 5

=VLOOKUP(RIGHT($A$3,LEN($A$3)-5),Lane!$A$9:$AD$20,3)

It won't work....

However, if I tried as follows,
=VLOOKUP(5,Lane!$A$9:$AD$20,3) OR
=RIGHT($A$3,LEN($A$3)-5)
Both works fine!!!

But I do rather something like as it is shown on the above in RED TEXT

Also I am worried if I have Week 10 the output will look as 0 instead of 10 so.

View 8 Replies View Related

IF With #N/A Output

Jul 28, 2009

I am using the following function quite frequently: (INDEX(DJ:DJ,MATCH($GJ3,DC:DC,1),1). Because of the way the data is organized the function is commonly undefined (output="#N/A"). I would like the program to print a constant (718) when the function is undefined. Below is the function that seemed intuitive to me, but doesn't do what I want.

=IF(INDEX(DJ:DJ,MATCH($GJ3,DC:DC,1),1)="#N/A", 718, INDEX(DJ:DJ,MATCH($GJ3,DC:DC,1),1))

View 2 Replies View Related

Getting Negatives (-1) In Output

Jan 30, 2014

I am using one file, in that out put is coming but some times it is showing out put as -1.

Please find the attachment.

In the Sheet 1 Column X some out puts are coming as -1, what is the error in my formula.

Platform Open tickets on 29.01.2014.xlsx‎

View 1 Replies View Related

Multiple Ifs With Corresponding Output

Feb 27, 2014

I'm trying to create an If then statement that will will allow multiple criteria and output the corresponding data if possible.

I've attached a sample data file to provide insight. I've also used a random number generator formula to create the numbers for the output. When I press F9 I'd like the data to appear in the dream house lottery section with the information of the house that corresponds the Neighborhood and street. What I have in mind below.

If C21=B2,B8,B13 and C22=B3,B4,B5,B9,B10,B11,B14,B15,B16, Then values of E,F,G,H,I appear in E,E,G,H,I appear in the lottery dream house section.

So =IF(C21=B8),IF(C22=B11), ????
IF(C21=2) and (C22=3), Then This is where my problem occurs. I'd like my output to be that of E through I11 to appear in E through I21.

Is that possible and does that make sense. I have a long winded version but it requires the formula to be in each and every cell and it will only allow for one neighborhood at a time.

View 9 Replies View Related

Date Output

May 19, 2009

in cell d20 i have a contract date
in cell d21 i have a lead time
this will always be in the format eg(2-3 weeks)
in cell d22 i would like it to tell me d20 plus the first number of weeks ( before the hyphen)
and in d23 the second number of the weeksafter the hyphen

View 7 Replies View Related

Search For Value And Output Corresponding Value

Feb 17, 2009

Here's what I'm trying to do hopefully you can help me.

1) Given value in Sheet 1: Column A, search for that value in Sheet 2: Columns A:C. Then output the value in Sheet 2: Column D of the same row, to Sheet 1: Column B

2) Same setup as above, but the same given value is found multiple times, then have say 1st value output to column B, second to C, third to D, and so on.

View 12 Replies View Related

VBA - Message Box With More Than One Output?

Oct 21, 2013

I am running a macro in Excel that when runs opens a message box that asks you to enter a start date, then and end date - this works perfectly.

However, what I now need to look at is adding a message box BEFORE these two fields that asks for a Sales Account Refrence number.

Once this number has been entered it then runs the date range boxes against that number entered.

Below is my code that currently works for the date boxes.

It is running a SQL string and the Sales Account Rerefence number is a field called org.sales_acc_ref

Sub GetData()
Dim create_timestamp As Date
Dim response As String[code].....

View 7 Replies View Related

CSV FILE Output

Aug 12, 2008

I am making a report that puts out a CSV file my trouble is that some of the numbers are converted to date when they are opened in excel. This report is sent out company wide and I need a way to keep the numbers from changing to date. I have added a tic(') mark to the front of the number but it comes over as '12308. What can I do.

View 9 Replies View Related

Calendar Output

May 12, 2006

attached spreadsheet. Notice cells A11 through B23.

Is there any third-party extensions, Macros or other functions that can output the dates and corresponding text (in column A) to a nice looking calendar, or even better yet to Outlook, or both?

I tried creating a pie chart or graph function, but non contain a calendar scheme.

Notice cell B7 is an input cell. This would determine the number of days the calendar would show in full. The begin date of the calendar would be in B11, and the last date on the calendar would be in B23. It could be a 30 day calendar, or more or less depending on the input.

For those "visual" people, a calendar format would be amazing, but I can't write a single peice of VB code, so I wouldn't know how to write a Macro.

View 9 Replies View Related

Output Csv File

Jul 1, 2006

I'm wondering if it's possible to use a button in excel where I can output a cvs file (from another sheet in the file) with just a click on that button.

View 3 Replies View Related

Auto Copying Text (Not Data) From Cell In One Spreadsheet To Another Spreadsheet Cell?

Nov 4, 2012

I wish to Automatically copy the TEXT that is written from Spreadsheet 1 cells D5 to F5 to Spreadsheet 2 cells F5 to J5 .... a similar range of cells.

Is there a formula I can use or do I need to venture into the programming side of things.

View 7 Replies View Related

Output Userform To Access?

Jul 21, 2010

I have a userform that employees use to enter production data every day. Originally I had this storing the data in excel, but now I would like it to put the data in tables in access.

Here is some code I am trying, but it's giving me an error: "Run-time Error '3251' Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype."

VB:
' exports data from the active worksheet to a table in an Access database
' this procedure must be edited before use
Dim cnt As New ADODB.Connection

[Code].....

View 3 Replies View Related

Change Output To Percentage?

Nov 27, 2013

i have the formula below,

currently the output is comming as a number but i need the output to come has a percentage what adjustments do i need to make to do this?

=CHAR(149)&" "&"The overall YTD"&" "&"performance is"&('Red Activity & Performance'!R45)*100&IF(INDEX('Red Activity & Performance'!R45:R55,MATCH("Red 1 8min",'Red Activity & Performance'!$A$45:$A$55,0),MATCH("YTD",'Red Activity & Performance'!$R$44,0))<INDEX('Red Activity & Performance'!$C$45:$C$55,MATCH("Red 1 8min",'Red Activity & Performance'!$A$45:$A$55,0)),"Is below the target (75%) by: "&TEXT(INDEX('Red Activity & Performance'!$A$45:$A$55,MATCH("Red 1 8min",'Red Activity & Performance'!$A$45:$A$55,0))-INDEX('Red Activity & Performance'!$R$44,MATCH("Red 1 8min",'Red Activity & Performance'!$A$45:$A$55,0),MATCH("YTD",'Red Activity & Performance'!$R$44,0)),"0%"),"has achieved the national target (75%)")

View 5 Replies View Related

Output Certain Items In A List?

Apr 30, 2014

I'm trying to accomplish the attached. This is just an example of what I want to do. There are no formulas in this spreadsheet.

Spreadsheet 1: Search by Number

Column A is a list of names

Column B is a list of numbers

Column C is a list of the names that correspond to the number "1" from Column B. Note that there are no blank rows between the names.

Spreadsheet 2: Search by Name

Column A is a list of names

Column B is a list of offices

Column C is a list of the names that correspond to office "Williams" from Column B. Note that there are no blank rows between the names.

I have used the index & match formulas to do this WITH duplicates or blank rows, but I would like to produce this without duplicates. I am willing to get as complicated as need be to make this happen.

View 3 Replies View Related

How To Consolidate These Files Into One Output

May 26, 2014

how to consolidate file01 to file02 merging them, resulting the expected output sheet. Currently im doing this manually and it really take up a lot of my time this is just a sample scenario. My real world use of this is composed of over 2000+ accounts with different product purchases and billing numbers.

View 14 Replies View Related

Output Difference Between 2 Cells

Mar 25, 2008

I want to compare and output the differences in text in 2 cells.

ie. Cell A1 has a long string of text as does Cell A2 but slightly different, I want to see exactly what the differences are.

Is there a formula I can use?

View 10 Replies View Related

Output Data In Multiples Of X?

Aug 5, 2013

I need the output in B1 to be in multiples of the value in A1, rounded up.

example:
Value in A1 is 6
random formula in B1: =IF(AND(N2>$AA$1,S2>0),ROUND((30/$AA$1)*AA2-Z2,0),IF(AND(N2>$AA$1,S2=""),ROUND((30/$AA$1)*AA2-Z2,0),IF(AND(N2<$AD$1,S2=""),ROUND((30/$AD$1)*AD2-Z2,0),IF(AND(N2<$AC$1,S2=""),ROUND((30/$AC$1)*AC2-Z2,0),IF(AND(N2<$AB$1,S2=""),ROUND((30/$AB$1)*AB2-Z2,0),IF(AND(N2=M2,N2<$AA$1,S2>0),ROUND(30*(AA2/N2)-Z2,0),IF(AND(N2<>M2,N2<$AA$1,S2>0),ROUND(AA2*(30/$AA$1)-Z2,0))))))))

So if the resulting value of my B1 formula is 2.33, I'd like to have the output be 6. If the resulting value is 14.55, I'd like the output to be 18.

View 2 Replies View Related







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