Question and Answer

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

vba issues

Hi,

When i am trying to create a new worksheet in a workbook via vba code , i am getting an error :- 'The command can not be used for multiple selections'.

The following code used:-

Sheet.Add After:=ActiveSheet

I have tried worksheets.Add,ActiveWorkbook.ActiveSheet.Add but stuck with same error.

Even i have tried also by making an object of worksheet.

My macro is running perfectly 2 or 3 times but after that i got error with command can not be used for multiple selections.

Manually i am not able to create sheets after got this error.

Please help me.

Selecting rows based on condition and then totalling cells?

Hi there!

 Here is my problem:

 I need vba code that will search for cells in, say, column A, for cells with the word "Name." Then, from those rows, find the numbers that are located in column E. I then need to get the sum of those numbers and have that plugged into a cell somewhere (I don't know where yet. Just somewhere on the spreadsheet where I can put a label on it).

I have the details listed below. I just wanted to get my final question in the top of this.

 

Sudden increase of file size

Hi!

I got here an excel file which suddenly became bigger by 34 MB.
The only changes I've made was adding two more tabs which are not bigger than the others (there were already 8 tabs).
Any idea what could make this file so big??
Thanks!

Keyboard Input

I am using keyboard wedge software to move a scanned string into my excel vba program. Problem is I want the program to immediately continue with next code line after scan occurs without requiring user to enter any info/keystroke. I have tried input and msgbox commands without any luck. Any ideas?? Pete

Unusual Lookup Table

 

 

I think I need VB code for a lookup table with non-unique entries in the match column. 

Below is an example.  I am given the LOOKUP TABLE and the values in the GIVEN column.  

How to sort files before inserting to worksheet

I am using a macro to insert picture from subfolders to worksheet.Picture name is in the order 0,10,30,60,90,120,150,180,210,240,270,300,330 etc....
Now its inserting picture in the order

0 10
120 150
180 210
240 270
300 30
330 60
90

But The output i required is

0 10
30 60
90 120
150 180
210 240
270 300
330

Pls help..

Code i am using is....

Option Explicit

Private fso As Object
Private fsoRoot As Object
Private fsoFolder As Object
Private fsoFile As Object

Const strRootFolder As String = "C:\Pictures"

complex permiation/combo formula

I am trying to come up with a formula on excel and any help would be much appreciated.

There are 4 columns titled: Player Name, Player Position, Projected Points, Player Salary.

I have a total of 103 players that consist of Center, Forward and Guard positions. Each player has a position, projected points value, and salary value.

I need to know all possible 8 player combinations (lineups) that have the highest projected point value with a total salary under $100,000. The 8 player lineup will consist of 2 guards, 2 forwards, 2 centers and the final 2 can be any of the 3 (utility).

Tips to Outlook

Hi,

link to ''Get a feed of new Excel / VBA / Finance tips to outlook'' doesn't work.

please correct 

ty

using different sheets match string to specific work and enter that word in active

Hi Guys

All below in the same workbook.
Starting from an empty column in a sheet called BankDownloadConvertor.
Positioning my cursor in Cell D2 which is titles Company use the text string in C2 ('CALL REF.NO. 0165 , PROSPECT CONSULT , FP 18/08/11 10 , 57173104389042000N)
then using a table “CompanyCategoryTrial” which is a list of all companies which does contain “Prospect Consultancy” locate/Match/Find “Prospect Consultancy” and enter it in cell D2.

Help please i need vba code to fetch data from mainframe to excel

Hi,

I am looking to ease my work and save lot of time with a simple VBA code my requirement is as follows.

I have some acct numbers in an excel sheet, i need my VBA code to copy the acct number and got to the mainframe application (which is already opened and logged in) and pull the acct information and copy specific line/ value from mainframe to excel sheet beside the account number, and repeat the action till the last acct.

Mainframe: AS400/Rumba mainframe display - Client.
Microsoft Excel Version: 2007.

step wise action in detailed for a better code.

combination between column and line chars

Hello,
I want to make in excel a chart like the attached one (I found it on the internet, and it looks very nice), but I can`t manage. The orange chart seems a 3D Column Chart to me, right? but whenever I am trying to combine it with the second chart (the line chart) I get the message that these 2 types of charts can not be combined.

Can you please guide me?

Or perhaps the chart is done in other tool and I should stop trying with Excel?

Thanks a lot in advance.

Tip9_3Maruti_nosource.png

importing table data from excel sheet to oracle table

Hi all,

We have an excel sheet which contains a table(with datas) along with some comments(some extra information on table columns) below the table.We need to import only table data into oracle table.We dont need those comments data to be imported into the oracle table.Can you please let us know how to do it?

picking the data

Hi,

Can anyone give me the script for picking up the data from specific cells like D3, F8 n k10 in Work book A to Work book without opening the worksheets.

Thanks in advance,
Vimala K

Script for creating new workbook

Hi,

In the attachment sheet, if the column E is "Yes" then it should creat a new workbook and name it with data of Column B.

For example row 2 as it is Yes it should create a workbook with the name of 110200. and loop should run till the column E is blank and nothing should done for NO.

Thanks in advance,
Vimala K

VBA to copy heading when new sheet is created via userform

Here is what I have so far:

-- I created a userform (truck hauling data) that uses the data entered to either create a new job sheet if there isn't one yet or go to a job sheet that has already been created. The data also goes to a master sheet which then populates a pivot table. It is all working great at the moment except for a couple of minor details that I would like to fix.

What I am looking for:

-- The title block that I put on "sheet 1" to appear on the new sheets when a job is created. I cannot seem to get it to go into the macros right without messing everything up.

Cell Color is not changing for duplicate values

Hi All,

Please find the attached image.

In row 74,75 and 76 cells color is not highlighting. Excel going to row 47,48 and 49 and highlighting the color as both have same values.

In the below image when the loop reaches m value to 74 it automatically changing to 47 as it has the same value and highlighting the 47th row color.

Can anyone suggest me how can i highlight cell color even when i have duplicate values ?

Thanks,

Ramana

Query.jpg

VBA - Compare Table Header with Merge Rows

Hi,

I have a master sheets with existing table, i wanted to update this table from other sheets for a specific columns. But this column having a merge header (2 rows).

How could i compare this column header with the master table sheets and update this data?

Could you please help me to have a vba code to check/compare and update the master sheet.

br,
ivandgreat

Edit links

When I open an excel sheet it says that the sheet has cells with external links. When I click on the Edit links in the data tab, it shows the excel sheets to which my sheet is linked to but I want to find out the cell within my sheet that refers to those external sheets. Please help.

Modify Recorded Macro to Insert Rows in any Area

Hi Team. I've searched and searched for answers. I found some great answers but didn't seem to work for my case. I'm sure it's because I am very new to VBA. :-) I would like to find certain phrase in a row i.e. "TPF FUND V - SERIES J TOTALS" then insert a number blank rows just above it then copy the functions from the existing row above newly added row. The number of rows to enter will change at times. Two, three, sometimes 5 rows at a time. I recorded a macro which works fine except that the location to insert row(s) will frequently change.

vba "evaluate" code not working

Hello, I am making a logbook, where I enter flight details in the AllData sheet, and when I select "ok" in column L, the code should automatically copy the information to the pilots sheets and make some adjustments.
The code works good for this part.
Now if I select CLR in AllData sheet,let's say in row 6, the code should go to the pilot sheet (pilot3) and check which row has the same information as this one. (in this case it is "row 5" in "pilot3" )
Then it should send a message box with the value of the row number.

Click a cell to open a mini table / group of cells.

Hi,

I work on many spreadsheets for building construction in where I have to price various items of work.

I will have an item for example that will require me to insert a rate.

For example

Emulsion paint to plasterboard walls : 15 M3 x "Rate" = total.

I wish to be able to double click the cell where the rate is sumarised and it open up a mini table / small group of cells that shows how the rate was calculated as opposed to the =value+value+value that I would ordinaryily have to do.

Is this possible? how would I do it?

Math within an array

Hi! is there somebody that can help me with a VBA code for excel? Thanks in advance.
I have one column A with 100 values

Base=A(1)

i=i+1
B(i)=A(i)/Base Until B(i)>=1.1 Then Base=A(i)

Example
A B C First Base= 12
12
12.5 1.042 1
14.5 1.21 1,21 Second Base= 14,5
15 1.034 1
16 1.103 1.103 Third Base= 16

This procedure until I reach the last row occupied.
Best regards Alfredo

need help

I have one excel issue that I am trying to find a solution.

I have two spreadsheets, I want to compare column A in spreadsheet1 with
column A in spreadsheet2. Only if product code in both columns A match, then I want to change data in their rows, in columns
C and F, so the spreadsheet1 will import data from spreadsheet2, from column D to column F and from column E to column C. If products in columns A do not match, do nothing about it, only in columns that matched.

I attached this file here.
can anyone PLEASE help me in this?

Regards,
Miralem

HELP!! Deleting empty rows (file size issue)

Hey Excel Experts,

Please help me out! The size of my excel sheet has suddenly increased in size from several KB's to over 6MB. I've read a whole lot about this problem and the various solutions but still no result.

My excel sheet is in fact a sort of 'app' based program. I do use a lot of different formulas, pivot tables and macro's. But the sheet is still empty i've only put in test data.

Looking for a code to enable Emailing Items on Spreadsheet

Hi All,

Need a code that sends emails to the intended receipients based on hold codes if Columnd J reads as YES
Email formats are listed on "Email Format" tab, code should pick the required field value from the table (Hold Report).
Analyst name, Phone number are entered in the text boxes (data validation for these is desired)

option boxes are used to send email based on the selection as below
if "send initial email without attachment" is selected then emails should be sent without the attachments

Estimating total usage incidence from samples

I’m trying to use Excel to estimate total unique visitors and total 1, 2 and 3+ time users from three (non-exclusive) samples of varying size and %s. Then, to estimate the same values from all three samples combined – an example follows (the data are attached in a spreadsheet too)

#1:
Total count: 300,000
Sample available: 30,000
Sample Size % of Total: 10.0%

Similarly, groups 2 & 3 lay out the same way:
Group 2:
5,000 (total)
2,000 (sample)
40.0% (sample %)

Group 3:
40,000
10,000
25.0%

Total
345,000
42,000
12.2%

Extracts string of numbers from cells and add an email extension, aidez moi sil vous plait!

Dear friends my name is Maeve and I am a PhD student

I need to create a database of emails of schools to contact for my dissertation on education. this district of my sample does not have a list so it would take me forever to do one by one.

i exported something on a .cvs file and it looks like this:

04000080;"C.E.I.P. San Fernando";"Adra";"";"";"sí";"";"";"sí";"";"";"";"sí";"sí";"";"sí";"";"";"";"sí";"sí";"sí";
04000110;"I.E.S. Abdera";"Adra";"";"";"sí";"";"";"sí";"";"";"sí";"sí";"sí";"sí";"sí";"";"";"";"sí";"sí";"sí";

Please help me with Sorting, Comparing and Deleting Rows

I have attached a sample of the file i work on. Actual worksheet contains more than 20,000 rows
It will be sorted by the message ID and then Names.

First deletion stage: Then we can delete all rows with which has unique or only one message ID in the entire worksheet.

Still sorted on message ID we go a step further to sort by names ( i.e within the message IDs sorted rows).

Second deletion stage: If two or more rows of the same Message ID have different names we have to delete those rows and leave the rows with the same names within each message ID.

Please Help Me!!! Anyone. I need a Title Generator - I have description and examples - I lack the knowledge - Any one Help??

This will be the first attempt to explain the scope of this "Title Generator" project. The title generator (TG) would look at a base Title that has been manually constructed - see column B located on the excel 1) Base and Generated Title work sheet. The Titles use Standard and ASCII Fonts and Characters. Once the base title (BT) has been constructed the TG would scan the BT (Base Title) then do a combination of rearranging the text / words and altering the ASCII characters. The generated Title is displayed in Column D.

Returning a sum of values based on data containing a couple of keywords

Hi, I have exported a load of keyword data from Google Analytics so I have a few key columns; 1/ Keyword and 2/ Visits.

The keyword column contains numerous variations of keywords and I'd like a formula which helps me count the number of total visits by any phrase in the list which contains 2 or more keywords.

For example:

Column A Column B

Bracknell Office Services 50
Bracknell Office 50
Bracknell Services 50
Office Services Bracknell 50

Syndicate content