Question and Answer

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

COUNTIFS with dynamic coluumns in other sheet

Hi,

I have a problem to count number of active defects if column names are dynamic(sometimes column STATE can be in column E, sometimes in column D etc. depends on created query in TFS). To make long story short: I have 2 sheets:

Copy & pasting from one active sheet into another

Hi,

I am trying to create a macro that allows me, in loops, to select a cell in one active worksheet, activate another worksheet and paste it in, then going through the process x number of times in the loop.

However, all that happens is that it seems to copy and paste from the 2nd active spreadsheet and not from the first. My code is below, and I am a newbie but if anyone could help it would be greatly appreciated.

Private Sub CommandButton2_Click()

Windows("NAme1").Activate
Dim i As Integer, j As Integer
i = 109
j = 109
Do While i < 110 And j < 110

Basic Help needed to automate a table when filling in monthly cells.

Hello All.

I am looking for help in order to automate my summary table of data.

Attached is an Excel file with Employee costs for a bunch of Clubs. On the right Hand side is a table which summarizes ( zusammenfassung) the current (Aktuell) and Previous month(vorherige Monat)data. The Information in brackets are the german words you will see in the table.

Count Conditional Format Cells with complex formulas

I have a speadsheet with conditional format formulas that have both fixed ($A$1)and relative (A1) references. There are too many cells to change all the relative references to fixed as each cell would have to be changed indiviually. I have as many as 3 different conditional format formulas. I want to be able to count how many cells meet each conditional format (one is yellow fill, one is bold type and the last is double underline). Since I can't use the conditional format formula, since each cell's is different, I need to be able to count the cells in the range if the format is applied.

Remove Duplicates - base on two columns Complicated

Col1 Col2 Col3 Col4
apple red 4 dog
apple yellow 7 cat
banana purple 4 dog
banana blue 3 dog
banana green 8 cat
orange yellow 4 lion
orange purple 1 cat

Hello. Here I want to delete duplicates based on two columns, 'Column1' and 'Column2'
We have two apples, I want to use column2 to determine which row to delete. Between red & yellow, I want to delete yellow so row 2 will be deleted.

3 bananas. between purple, blue, and green I want to keep 'green' so row 3 and 4 will be deleted.

Insert Scroll Bar Help

Hi,

I have created a spreadsheet that has a calendar going horizontal along the top of my spreadsheet with an inserted scroll bar above it that can change through the dates. The cells underneath are blank but with a list attached with each persons name in the list that will be using the spreadsheet. The left rows are the list of things that the person will put their name towards and the columns are the dates that they will require the items in the list.

Excel Macros VBA

I am new in Excel Macros VBA.

Please any to solve my problem

I want to add String value in Combobox
and the code i am writing is as
Dim cName as String
ComboBox2.AddItem ("cNameNext")

Please Correct the Code

Thanks

Running a macro based on double clicking a cell in a different sheet

Dears,
Good morning or good evening wherever you are.
I am new with VBA. So, I had to search online on how to do what I wanted to do with my workbook. But now I am stuck and I hope you could help me.

In sheet 1, there is a table of data.
Each row has a site code and some data related to this site.
I want to copy certain rows to sheet 4 based on a cell value containing the site code. So, I used the below code:

----------
Sub CopyData()Dim myWord$
myWord = InputBox("Enter Site Code:", "Enter your word")
If myWord = "" Then Exit Sub

Application.ScreenUpdating = False

Need help extracting data - pivot tables, vlookup and maybe VBA?

Hi, I am working on an excel sheet and need some help.

I have data in the format of Part B on the attached image. I have only shown a few examples of the data, but I have 15+ various line items which all have different work items, descriptions, work orders, completion dates, etc.

I need to sort the data in various methods to include the actual cost based on car, location, type, etc. I believe pivot tables is the best tool to use to analyze the data. However, with pivot tables, I've found I need all of the data on 1 line like Part A of the attached image.

Excel Help.jpg

My Excel 2007 Files seriously corrupted

Dear Experts,

All my excel files have been corrupted and I'm unable to open any of them.
I tried couple of free download for excel file recovery in google but non of them helped me.

I see message from Microsoft Excel: Your file is severey damaged unable to recover is the message I am getting.

Please help me....as they are some critical files.

Thanks in advance..

How to compare two string in two different workbooks?

Hi All,

How are you doing?

Guys need your help,I want to compare a string in a different workbook. and find the relevant cell value of that.

e.x. in one worksheet the value displayed like "DEBIT/ATM CARD TRANSACTION FEE"
But in another worksheet the value displayed as "018 - Debit/Atm Card Transaction Fee".

Now I want to compare this string and the value displayed in the column E for this row of workbook 2 should be displayed in workbook 1 in the column D.

Can anybody help on this?

Thanks, have a good day !

Regards,
Somani

Macro changing formatting of time

Hi

I am hoping someone can help me.

I am using the following macro to create a csv file containing commas and quotation marks from an excel file:

Sub CSVFile()

Dim SrcRg As Range
Dim CurrRow As Range
Dim CurrCell As Range
Dim CurrTextStr As String
Dim ListSep As String
Dim FName As Variant
FName = Application.GetSaveAsFilename("", "CSV File (*.csv), *.csv")

ListSep = Application.International(xlListSeparator)
If Selection.Cells.Count > 1 Then
Set SrcRg = Selection
Else
Set SrcRg = ActiveSheet.UsedRange
End If
Open FName For Output As #1

Help with Excel dilemma

My dilemma is simple but hopefully someone can help me. The scenario is such:

I have three columns: A,b,C

(A) has a list of charges received and (B) is the category on each charges and (C) is the insurance that charged (A). now I am trying to get the average of Charges (A) per categories (b) but only selected a few insurances not all the insurances (C) someone please help me. Thank you

How to separate an address in a cell with no spaces

I would like to separate an address in a cell where there is not a space between the street/city and zip code/country

Example: 9550 BLUEGRASS PKWYLOUISVILLE, KY 40299USA

I know how to use "Text to Columns" for each individual cell, but I have a spreadsheet with 1,800 address.

Any help would GREATLY appreciated!!!

Thank you,

Eric

Autolocking cell after entering number and protecting the cell from editing

Hi.
I need help guys with vba.
So I created a table as shown in the attachment file. What I want is to autolock the cells from editing after entering the number between B2:M2, B3:M3 and so on. And password protect each cell under the sum column.
Thanks in advance!

VBA code to sort rows that contain offsetting amounts based on account number

What I would like to do is develop a code/macro that will sort rows that contain offsetting dollar amounts based on their account numbers. Each account number may have several entries, but they offset between negative and positive dollar amounts. I would like to be able to sort those rows by Column A (Account number), then have offsetting amounts in rows next to each other so they can easily be deleted from the excel sheet. Example:
Loan # Date of Pmt Principal Interest Total Payment Tran Code Type
****128 07/16/14 (557.57) (1,372.37) ($1,929.94) 999 Past Due

Excel finding row no of nth occurance

Hi all, I have 10 col and 100 rows of random numbers. For simplicity and ease of example lets assume they are in order from 1 to 100 and repeating. i.e R1C1(A1)=1, R1C2(B1)=2...... R1C10(J1)=10,
R2C1(A2)=11, ..... R2C10(J2)=20
R10C1(A10)=91 ..... R10C10(J10)=100
R11C1(A11)=1, R3C2(B11)=2...... R3C10(J11)=10
.
.

Arranging data in excel

I have a form where I receive a data with not in exact format..For example here is the data received by three forms and combined in excel.

ColumName Values ColumnName Values ColumnName Values
Name A Name A Name B
Date 1/1/2014 Date 1/1/2014 Date 1/2/2014
Value_1 3 Value 2 2 Value 1 6
Value_2 4 Value 3 8 Place1 Jp
Value_3 5 Place 2 US Place 2 US
Place_1 Den
Place_2 US

Corrupted Xlsx File

So, i was copying some files after work from one partition to another. I then accidently deleted both partitions due to being really tired. I managed to get my files back using recovery software. However one of the files recovered was an Excel file.

Ms Excel says its corrupted snd that i can't open it. Its a really important file for me as it has my work hours all written down in it so i would really like to have it back.

Anyone have any ideas?

I've already tried opening it in openoffice calc but it just comes up in mumbo jumbo language/text.

Looking forward to your feedback!

need help going round in loops

Hi im working on a project at the minute, where im creating a template book in excell.
I can add pages and rename them to Page 1 , Page 2 etc.. i can insert new pages inbetweeen the count and not screw it up. how ever in P20 on every page i will have a time . On the frontpage (sheet 1 ) i would like to display this TOTAL time in cell I16.

i know if i manually enter the formula =sum('*'!P20) it will perform. but it only does this one time. Ive recorded a macro added it to a button and can only get a single use from it.

EXCEL Help

Can anyone help me figure out the best way to do this. Is it as time consuming as I think? I've attached the spreadsheet given to figure the below question out. Would like someone to explain how to do this quickly as I have several other questions that are similar.

We want to conduct several analyses. Please perform the calculations necessary to complete each of the following tables.

1) Find the share of teachers within each grade-band who captured, but did not share.
2) Find the share of teachers within each grade-band who captured and did share.

auto-populate a formula for a rolling range of cells

Hopefully someone on this forum can help me. I've already posted this same question on other forums, but no luck yet.
( I have even included a sample of the spreadsheet for you to look at to see what I'm referring to... )

I have a column of values (E4:E87). I'm adding 1 value to this column manually each day...so tomorrow (July 24th) I will have E4:E88...and so forth. Each day is a new row.

In column Z (i.e. cell Z87) I have the formula =(SUM(O53:O87))/(SUM(E53:E87)). Z88 will have

Problem opening a "xls" file

Good day,

I'm having a difficulty opening a .xls file using a Ms Exel 2003.

It prompt a box saying:

The file you are trying to open, 'AA.xls' is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you wan to open the file now?

If i click Yes. Another pop up will show:

The information you were working on might be lost. Ms. Office excel can try to recover it for you and i checked on the " recover my work and restart Ms.office excel"

A blank Ms.Excel will be shown.

Generate MS Publisher file with VBA/Macro?

Hello,

I have only a little experience with VBA and macros but I am definitely willing to learn if in fact what I want to do is possible...

What I have is a list of education seminars (Date, Time, Title, Location, etc.) in Excel. I can pick the title of one of the programs my organization does and even the facility where it will be held (there are only so many). From there, with defined lists associated in a formula, I can autofill things like program description, etc.

VBA-Excel: Subtract date and time from two NOWs and display it in a textbox

Hello ALL,

I am trying to create a VBA code that calculates elapsed time after a certain action checkbox is clicked.

On clicking checkbox1 NOW is captured and display in textbox1.
on clicking checkbox2, NOW is displayed in textbox3 and the elapsed time (value in textbox3 - value in textbox1) needs to be displayed in textbox4 in hours and minutes format accurately. Which i am unable to do after trying and googling for different codes.
I have remained on and off with VBA, so i am not fluent. Can someone help me with the piece of code?

VBA to delete specific rows in a list

I have a list of some 20 columns and thousands of rows. What I want to do is develop code that will delete an entire row if the content in column K = AJ1, and the content in column J = AK1.

This is what I have, but I cannot figure out how to make the search criteria for both columns:

Sub TestDeleteRows()
Sheets("Sheet1").Select
Dim rFind As Range
Dim rDelete As Range
Dim strSearch As String
Dim iLookAt As Long
Dim bMatchCase As Boolean

strSearch = Range("AJ1")

iLookAt = xlWhole
bMatchCase = False

Set rDelete = Nothing

Application.ScreenUpdating = False

exel popup

Hi,

I would like to now how to have a popup with fields to change in existing exel files
I have several files where the general data is always the same but some of the fields are to be changed,
but they are not so clear and easy to oversee or even make mistakes.

Thanks

Unhide worksheets" Unable to set the visible property of the worksheet class"

Hi there
I tried to unhidden worksheets by change it to visible instead of VeryHidden but I can't
Is there any VBA code that can solve this problem?
by the way, Excel file is unprotected now

Thanks for help

Unhide

How to make restoration of corrupted excel 2007 file?

Hi there,

When I open an excel file the following error message is displayed: “The file may be corrupted, located on a server that is not responding, or read only”. Since this happened whenever I open any excel file, the above error message is again displayed, I must also mention that I am sure my files are not read-only and the files are stored on my hard disk and I use VM ware and my OS is windows server!

How can I solve this problem?

French Version Excel

I am using a French Version of excel on a MAC Book. When trying to enter data into an existing template formula which was set up in the UK, when I input data I am getting an error 13 message and the word Value!! Is this purely a language problem?

Syndicate content