Question and Answer

For Excel / VBA questions - You ask, Excel Experts will answer

Macro to export data from certain cells

Hello,
I have a sheet (sheet1) which is used by different users many times to generate an invoice.
After creating the Invoice, data is deleted to prepare a new Invoice.
I want to capture information from certain cells (such as Invoice no, Invoice date etc) each time to another sheet (sheet2) so as to generate a list of invoices made so far.
The list will keep capturing the information from these cells one below other. The data should remain there even if the data in sheet1 is deleted for new data entry.
I have attached a sample sheet.
Can anybody help?
Thanks in advance

writing unique values from dependant comboboxes to a sheet

i have a source sheet and a resultant sheet. i have a form with comboboxes on which gets it data from the source sheet.
i have 3 dependant combobox on the form. combobox 1 is populated on userform_initialize, combobox 2 is then populated by a unique list of values based on combobox 1, combobox 3 is populated by a unique list of values based on combobox 2.
i now need to load the unique list of resultant values from combobox 3 in a dynamic range or array and print it to a sheet using a command button. here are two conditions though,

Help with Macro for merging multiple cells on mass level

Hope someone can help me here. I have been asked to generate a macro that will insert columns at E & F and then merge D, E & F for each individual row for the entire sheet.

I currently have the following macro as a sample but was wondering how I could easily get this to go to the bottom of the sheet?

Sub Macro1()
'
' Macro1 Macro
'

'
Columns("E:F").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range( _
"D1:F1,D2:F2,D3:F3,D4:F4,D5:F5,D6:F6,D7:F7,D8:F8,D9:F9,D10:F10,D11:F11"). _
Select
Range("D11").Activate

Help with excel formula

I’m having difficulty with an excel formula- I can’t figure out how to create a standard formula that will eliminate the zero’s and add numbers/ characters if they are present from the original data.
Final Format is ###-#-##-##-#######
Original Data                           NEED IN THIS format

Sendkeys to IE9 in windows7 not working - Any pointers please

Sendkeys to IE9 in windows7 not working - Any pointers please

Need help VBA macro to handle webpage dialog

I have macro that selects the element from drop down box and then click on APPLY button. As a resultof click I could see a web page dialog box pup-up which PRINT, DOWNLOAD to SYSTEM, CANCEL buttons.

Since this is a model window I am unable to FINDWINDOW, unable to sendkeys in 2010 win7. Please can you help me to trigger the event exportGrid as per the below script got from F12 IE Developer tools.

Grid.prototype.printOrExport = function ()
/*
Show dialog to give user choice of either printing or exporting the grid.
*/
{
//var numRows = RowVisible(this.gridData);

Calculating employee tenure

I have an excel with joining date of employees (old and new). To calculate their current year's pro-rated salary for the current year.

For instance

Joining Date Tenure Salary Pro-rated salary
01-01-2012 1 $ 100,000.00 $ 100,000.00
28-06-2012 0.5 $ 100,000.00 $ 50,000.00

I have an excel with employee data and I need help with formula to calculate the tenure.

Please help

Nested IF, AND formula

Hello,

Trying to get the conditions correct on a nested IF/AND formula in attached file.

The logic for cell B2 is as follows:
IF D2 is blank AND I2:I7 are blank, then B2 is blank
IF D2 is text AND I2:I7 has any blanks, then B2 is "N", else "Y"

Thanks for any help,
kdub

pictures/ photos

I am trying to figure out how to link pics in excel and get the pics to show up when I am using my cell phone to click the link.

I am not sure how to say this, I want to put the spreadsheet on the phone and click the pic link and open the pic. I can do it on my PC.. How do I tell excel where the pics are on the phone???

I hope you can understand what I am trying to say.....

You can e-mail me if you want, rav30p@gmail.com thanks much...... Richard

Trouble with calculations in Excel table

Hey,

Save As function

Hello,

I want to save a file with path and file name contained in cell C2, and current date saved in C1.

For example, I have in cell C2 ="C:\RL\RL REVAMPED 2012-1 TB as of "&TEXT(C1,"YYYYMMDD")&".xlsm" and in cell C1 I have today's date.

I tried typing the following code below but I get an error message that there is a break in code.

ThisWorkbook.SaveAs Filename:=range("C2")

Thanks in advance for your help,

GNY

Pull info from mutiple sheets even if you move info from sheet to sheet

I need to look up multiple sheets within a workbook to get a single piece of data.
Example:
Sheets- Build/Brett/Leo/Nick
Need to fill Build N:N with cell B from one of the other sheets depending on matching criteria With is column A on all sheets (criteria is 1,2,3,4,5)
Looking so if you move a row from Brett and put it into Leo it will still read the data to Build.

question

help needed please -
cells A1:A50 need certain tasks entered and I want cells B1:B50 to autofill with specific codes when entering the recurring tasks
eg
A1 work B1 ab123c
A2 rest B2 de456f
A3 play B3 gh789i
A4 rest B4 de456f
etc
- the less typing the better.

Calculating hours worked less break

I work different length shift some of which are over-night.
I'm using the formula =IF(((C1-B1)*24)<0,(C1-B1)*24+24,(C1-B1)*24)=IF(((C1-B1)*24)<0,(C1-B1)*24+24,(C1-B1)*24) Where cell "B" is start time and cell "C" is finish time. This calculates hours worked whatever shift I'm on.
Is there anyway I can also deduct a hours rest break if I work more than 7 hours ?
Any help would be appreciated

[Excel 2007] Conditional Formating

I am trying to get my spread sheet to turn some different collors.

If Z2=A then turn the row red
If Z2=B then turn the row green.

I have tried a few things, but i can only get one or the other

Linking Excel Workbook

Hello Guys,

I built an excel template with a decent level of sophistication. This template involved several workbooks that are linked together. I have at least three layers of linked workbooks with the destination workbook from one becoming the source workbook to another.

I hide the middle workbook from the user since the user has no business with that workbook. The problem now is the middle workbook does not update without opening it hence the final workbook does not update.

My question is there a way to make the middle workbook update automatically without opening it?

VBA - If....Then not working in a For......Next Loop (Sorry, I'm a newbie!)

Hi all. I have a very simple task to carry out that I'm sure a child could sort for me.
(i) I want to go to a cell address & check whether it's empty or not.
(ii) If it's empty I wish to ignore it & check the cell below - If it's not, I wish to hide the entire line that the cells is located on.
(iii) I then wish to check the next 49 lines below and carry on with the macro.

The code I have written is as follows:

Range("g1").Select
For i = 1 To 50
If ActiveCell.Value <> 0 Then
ActiveCell.Rows("1:1").EntireRow.Select

lookup query

Hi,

I am new to this forum .File has 4 tabs - Skills inventory,skill matrix,leave and attrition.Skills inventory=skill matrix-leave-attrition.

Select values

Hello, thanks in advance for any help that can be provided.

I own a business that builds custom motorcycles. I have an Excel spreadsheet that I use to keep track of the build and budget. Next to every item is a price. Every build is different so I don't use every line item in every build. I would like to be able to check a box next to the items that I am using which would then move the price over to the next column which is the one that gets added up for the build total. Is this possible and how can I make it happen?

I am using Excel 2010

Thank you,

Roland

one click import from multiple files

Hello
I have a folder on my pc which has one output file (eg. Database file attached) and a large number of input files (eg input 1, input 2 and input 3 attached). I want to know a method by which I can get data from these multiple input files TOGETHER for display in the output file in multiple rows rather than individually opening each input file and selecting one file at a time from a dropdown for import.

Pause VBA until email send completes

Hi,

I'm dumping out a chart to a png file and then emailing the png file. Then I want to delete the pgn file. Currently, though, my code deletes the png file before it gets attached to the email. How do I pause VBA until the email send completes?

My code snippet

With olmail
.to = "someone@myoffice.com"
.HTMLBody = .HTMLBody & "< img src='c:\dump\chart1.png'>"
.Subject = "Average Response Time " & Format(Date - 1, "Long Date")
.send
End With

Set OutMail = Nothing
Set OutApp = Nothing

With New FileSystemObject

Need some direction where to go, please help!

We run a car parts e-commerce store and use vendor-supplied spreadsheets to import product information. Our website has been changed so that when importing product information, the part applications (which vehicles the part fits) must use a range for years ("2004-2011".) The spreadsheets are given to us with each year in its own row, meaning there are multiple lines with the same part number, make and model with only differing years. Please see the spreadsheet I attached for better clarification, on the left is how the spreadsheets are given to us and on the right is how it needs to look.

FREIGHT CALCULATOR - Having issue to next IF / Index / Match

Pls. help to achieve following calculus to derive "Freight" with Calculator sheet, as still facing problem with IF / Index / Match combination.

Attached is the file in excel 2010
1. Three product "FE", "FP" & "FS"
2. The PinCode & Zoning lookup is in sheet "FEDEX_DOM_CATEGORY"
3. The Pricing is in sheet "FEDEX_DOM_PRICE"

"FP" & "FS" Zoning
Regions IMS Zone
Mumbai DA
Pune DB
Ahmadabad DC
Rest of West DD
Bangalore DE
Hyderabad DF
Chennai DG
Rest of South DH
Delhi NCR DI
Rest of North DJ
Kolkata DK
Rest of East DL
North East DM

Overtime Formula Gives Negative Answers

Greetings & Salutations All,

creating a database from mutiple source files

i have been on this for a while now and i dont know how to do this
i have to create a database of the forms that are filled in. the forms are all of the same format.
now i have a database file which is like the one that i have attached.
And i have the form sample attached as well
what i want is that if i fill this "HCP form 1", all the entries will automatically be filled in the database under the relevant column headers.

How to Copy data from one sheet to another.

Good afternoon,

I am rather new to using excel so please forgive me if I sound like an idiot....

I am working on a spread that performs a query to an Oracle database so that I can have real time data to work with for some dashbaords that we have displayed in out lobby. One of the issues I am having is seperating out some of my data. Now I will appolgize in advance for not being able to post a sample of my data, but all of my data is propritary information.

need help with #N/A removal

I am running into some "#N/A" issues. It could be a formatting issue but I need some help.

I have a tab called raw. The "raw ordered" tab reorders the "raw" tab by pulling data from it using INDEX and MATCH function. It works nicely overall. But scroll over to columns AC and on, and it does not pull in the data from "raw" tab even though the data is there. It displays the "#N/A". That is my first issue. Can someone see why it is doing this? I checked for spaces in the IDs that the formula is pulling from and they are in identical format.

Macros for Working with Data

I'm willing to learn how to do this but before I spend a lot of time trying to figure it out I'd like to know if this is possible, then where to start.

Excel Macro

sir i created commandbutton named Scan and other saveAs and a label window. so when i click scan button it shud scan documents from scanner and display picture in label window. and after that when i click on saveAs button it must save it in c:\customer id folder with the name i select. Now when i click on find button and input name of customer it shud display in label window. thanks

aman

SumIf(S) formula with special criteria across two spreadsheets

Hi Guys,

New here to these forums hoping I could get a quick response for a particularly complicated excel question.

What im trying to do is Sum a particular set of data that occurs multiple times on database1 based on what the column to the left of it says. I then want this summed data to be placed into database2 which has a set of data that is only listed once and the totals column to be summed in the column right next to it.

Ive attached both database1 and database2 for reference I can better explain what exactly I need.

Syndicate content