Question and Answer

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

Help needed

Hello,

I have assigned a macro to a shape in Excel 2007. The VBA code look for the name of this shape in an Excel data sheet and using a vlookup function pulls out the information in the adjacent column.

The problem I am having is I want to italicize and bold some words in the message that is showing in the userform. I searched a lot on the internet but couldn't find any solution. Please let me know how can I italicize and bold some words in the message in the userform.

Thanks

Filter problems

We have a excel spreadsheet with filter on. We are working in Excel 2010 on a MS terminal server.
Everyone can open the spreadsheet and the filter is on every time the user is opening the sheet, except one user. Every time this user is opening the spreadsheet, the filter is gone.
Any idea what can be wrong? We want the filter to be saved for every user all the time.

Run-Time Error 13 Type Mismatch

I am relatively new to VBA. I am trying to create an index which opens a second workbook table to retrieve a value. I keep getting Type mismatch on the index function, which I believe excel does like the data format. I set the variable to be variants to no avail. What am I doing wrong?

Dim Filename As String
Dim destSheet As Worksheet
Dim Column As Variant
Dim Row_S As Variant
Dim SID As Variant
Dim Data_S As Variant

Filename = "C:\Users\Documents\UBPR_Page12"
Tabname = "Data"

Set SID = Application.Sheets("Data_Table").Range("D11")

sorting a-z & z-a

Hi

I am trying to reverse sort some tables on 2 differtn worksheets
the first half works fine on sheet 1
but the other does not work on sheet5 eventlog sheet
just cannot see why it keeps given me errors when i run it

Range("h21") = ">just here "
Range(Cells(22, 8), Cells(42, 16)).Columns.Sort key1:=Range("h22:h31"), _
order1:=xlDescending, Header:=xlNo

Worksheets("Event Log").Range("a9") = ">Event Log "
ActiveWorkbook.Worksheets("Event Log").Range(Cells(10, 1), Cells(30, 11)).Columns.Sort key1:=ActiveWorkbook.Worksheets("Event Log").Range("a10:a30"), _

Macro for Drop down menu based Massage box

Friends,

Good day to everyone !

I need a macro code for the following problem.

I have an excel sheet and on that I am using drop down menu in Cell U8 to U357 (Data Validation). In this work sheet, If I selected the value "A" from the drop down menu, I want to Display a message box with a message " Please enter the absent mode" and once the user clicked OK on the message box automatically the selection should go to its parallel "V" cell.

Need Help on Multiple Column/Row Comparision and Count

Dear Experts

I need some help/advice on comparing and counting mutiple Rows/Columns

I have 3 Columns as per the attached Image

Nos No1 Count

need to compare "Nos" column with "No1" and print the count on Column "Count"

Tried with counfif() function, which is working fine. However When i Copy the folumula to next column the range is changing and giving me incorrect result.

Please Help on this.,Thanks

Excel Help

Need Help Arranging the Fields and respective data in an order.

Hi,

Please can any one help on how to Arrange the Fields and respective data in an order. using formula or script.
I have attached the example file with this post.

Problem with updating links

I have an Excel that links to several other excels. When opening, I get a dialog box saying "This workbook contains links that cannot be updatyed". If I then select the "edit links" it lists all of the other excels and says they are "OK". The data it displays in the linked cells is correct. As everything seems to be Ok links-wise, why do I keep getting this annoying message and how can I fix it? Any ideas greatly appreciated!

Need Excel Macro to compare Values of Two column based on Combo box selection value in Userform1

Dear All,

Am having a user form1 and have combo box and button in it

Am selecting a value "Feb" from Combo box, then i have some columns having data's below "jan" and "feb" header

I need a macro that should check after i select Feb from combo box
{

If (get values under jan and return 'true' if values present else 'false') &&
(get values for Feb and return 'true if present else 'false')

}

True or false i need based on which i need to update one column at the end with this value.

Kindly help ! . thank you

Excel 2010 - Userform - Updating data on same row on datasheet if same unique number

Hi there,

I am just coming to grips with VBA and Userforms and have been researching extensively on the Web for any existing code that I could use, but have been unsuccessful thus far.

COPY ROWS IN MULTIPLE WORKSHEETS IF COLUMN EQUALS A NUMERIC VALUE

Hi,

I am new at this VBA stuff and am having an issue programming this one issue I have.

How to figure out a pivot table needs to be refreshed in VBA?

Hi

I have a pivot table in a sheet. When the sheet is activated, I refresh it.
As refreshing takes time, I like to refresh it only when the source data has been changed. How can I figure out it in VBA?

Thanks,

Amin

Search for date and then apply various search criterias

Hi,
I am trying since couple of hours to construct a formula. However, unsuccessful. Do you guys have a solution? It’s for my Master Thesis.

My Problem:

I have 1000 firms that engaged in M&A activities. For those firms I need a Benchmark-Firm selected via Size (Market Capitalization) and Book-to-Market Value (BTMV) in the respective month in which the initial company engaged in M&A. All of those 1000 active Companies were active in different months spanning from 1997 to 2012.

formula for Total interest earned in a financial year on Fixed Deposits on date of opening and maturity.

I opened multiple Fixed Deposits/Term Deposit on different dates in financial year 2012 - 13 for different terms. Interest is compounded quarterly and paid on maturity. Is there a way I can calculate interest earned on all FD's for a given financial year which ends on 31st March.

Example

Fixed deposit #1:

Amount - Rs. 1,00,000
Rate - 8.75%
Term - 1 year 16 days
Date of Opening - 10 June 2012
Date of Maturity - 26 June 2013

Fixed deposit #2:

Amount - Rs. 1,00,000
Rate - 8.75%
Term - 33 Months
Date of opening - 16 August 2012
Date of Maturity - 16 May 2015

User defined range in vba

I like to define a range like
Range("A1:value in C1").Select
where A1 is the cell address for the beginning of the range and the end of the range is the value in cell C1 (example C560)

How can I define the end of the range?

Formula for caluculating empty and text

Hi All,
I have to calculate a cell is having empty or not,if having it should not be completed.

if the cells is empty and not equal to Completed than 5 have to come in new cell or 0 have to come.

I'm writing Macro for this.Please help me to complete this task.

My code is
Sub ComplianceSolutionApprovalFormula()
Sheets("ComplianceReport").Select
Range("BN1").Value = "Solution Approval"
15]<>""Approved"",10,0),""NA"")"
Range("BN2").FormulaR1C1 = "=IIF(OR(ISBLANK(RC[-58])),IF(RC[-58]<>""Completed"",5,0),""NA"")"
End Sub

How to get Indian currency presentation in accounting format in excel

Dear Sir,

Presently I am using [>=10000000]##\,##\,##\,##0 ;[>=100000] ##\,##\,##0 ;##,##0 customized format to denote numbers in Indian denomination, but while entering "zero" in a particular cell it displaying as 0 and negative numbers with - sign before the number. but I just want to denote 0 as - and negative numbers should be in () and to display same as Indian denominations as 1,00,00,000 and (1,00,00,000)so please customize the above format applicable to my requirements

Thanks in advance.

How to set up a working date function

Hello,

My name is Carl Brooks and I am a sales manager for Audi in the UK. I am not a programmer so I hope I come to the right place but I want some help on a spreadsheet I have got. I have a spreadsheet which the company users to keep track of Eoh (End of Honeymoon Calls) and Brochure data.

Adding file count and folder size to current macro, can this be done or does the code have to be rewritten?

This is the code I have.
What it does is it imports the name of every folder then splits it by Last name, First name, Record number,and Date of Birth. It also sorts the record number in Terminal Digit so it reads the last 2 number first then the middle 2 numbers then the last 4 numbers and puts them in order from there.

With this new code i want to be able to add a X-ray count( the files in folder count) into column E so it lists the files per folder also right after the Date of Birth.

Then add the patient folder size in column F.

GET date from filename

Hi,
I have a file as filenamex - filenamey-date
how to write vba code to get date from filename in column A till end of the row.
please help

Making fancy automatic graph

Hi everybody,

I'm making up some fancy graphs that could be used for the following up of a project and I'm quite stuck...
In the attachment of this mail you can find the current situation.

What I want to become with the aid of following field:
Project Month: June '14
==> This field should become a 'Trigger' to make a distinction between the already realised time (=PAST, <= June '14 in full lines) and the upcoming timing (Forecast, > June '14 in broken lines --)

Furthermore I would like to see only the number of this month
(so not all the numbers of the others months).

multiply if

Hi everybody,
I need to compare two rows of text and multiply the values if the text matches. It would be something like SUMIF, but with multiply instead of sum. For example:

mouse- 1 monitor- 30 mouse- 10*1
keyboard- 2 mouse- 10 keyboard- 15*2
monitor- 1 keyboard- 15 monitor- 30*1

I want it to work like SUMIF, compare the first two ranges and multiply the corresponding values.
Thank you very much for your help!

auto fill cell with sheet name

hi,
i need to rename a daily sheet with the date on the tab at the bottom of the sheet. how do i get this to autofill into a specific cell on the sheet? eg 4.11.13 to cell a1.

VBA Code To Consolidate Individual Spreadsheets to 1 Consolidated Spreadsheet in New Document

Wondering if this is an option:

Interested in combining 7 individual excel files (1 worksheet per file), with exactly the same layout, structure, and basic data). 6 Columns per worksheet laid out exactly the same in each excel file.

Looking to automatically consolidate the data between all the sheets to one excel file, and looking to put into a pivot table to view the information.

Any thoughts or suggestions? Things to consider?

anyone want to help me? I love excel and systems, but VBA doesn't seem like something that's teach yourself.

Fetch Data automatically in a single cell

hello forum members.

Runtime Error 438

We recently upgraded Visio to a 2010 version from a 1998 version because of incompatibility issues with Office 2010 and windows 7. The following code used to draw an electric diagram for our technicians, but since the upgrade now gives a runtime error 438.

Private Sub cmdPwrDwg_Click()
Dim pwrFile As String
Dim myFile As String
Dim tShape As Excel.Shape

If Not Dir(shtSettings.Range("B1").Value) = "" Then
pwrFile = shtSettings.Range("B1").Value & "Power Diagram.vst"
If Me.cmdPwrDwg.Enabled = True Then
shtDrawing.Activate
If wrkElect.curDwg Is Nothing Then

How to avoid Excel save pop-up

During workbook close, how to avoid excel save, don't save pop-up.
We already fool the excel by telling it, we saved.. But still the pop-up is throwing.
It is not coming for all excels we have. I have a .xlsm file, only for which it is coming. Sorry that I can't able to share my program.
Following is my workbook close event in vba.

Private Sub App_WorkbookBeforeClose(ByVal wb As Excel.Workbook, Cancel As Boolean)
My code
wb.saved = True
End Sub

I also tried Activeworkbook.Saved = True, Thisworkbook.Saved = True, nothing is working fine..
Please leave your inputs to solve this.

Midsummer007's picture

Problem with drop-down list

Hello, everybody!

English is not my native language.
So I use Google Translator.
Sorry for the correctly speech.

That's the problem:

Cell A1 drop-down list (Alpha;Beta;Gamma;Delta;Epsilon;)
I need to:
When I choose in cell A1 'Beta' all values from Table #2 column Beta (orange colored), will automatically change in column '1111' (pink colored) in the same order, that they were in Table #2 column 'Beta' (orange colored).

Similarly, with all others:

I need help to design a VBA code

Hi;

I want to design a Macro to simplify my daily process. What I need to is that I need to compare fund's value between yesterday and today. However, the fund #s are not the same every day, because some old fund #s are out and some new fund #s are in. When new fund #s are in, they may not be starting from the last existed fund #, they could be in the middle.

Excel Transpose

Hi there,

I have a row with numerous columns:

Supplier Number, Name, Address, Contact1 name, Contact1 email , contact2 name, Contact 2 email add, Contact 3 name , Contact 3 Email Address

I need to transpose , where column 1 and 2 get repeated for every row, and each contact name with it asocaited Email has it's own row.

Any ideas ?

Thanks
Monica

Syndicate content