Question and Answer

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

Crazy optionbuttons

I have a very weird problem with a userform and its option buttons. There are 5 identical columns of buttons, each with 14 rows. Each row is grouped with a frame. When the Calculate Scores button is hit, a grade is created below each column. It appears to be working as expected until any button in row 11 is selected. At that point, the grade does not get calculated and, this is where it gets weird, some of the option buttons in row one have either changed (yes, flat out changed to a different selection) or become "half" selected.

Fantasy League Formulas

Hi there Im in the middle of creating a Fantasy League for myself and my friends I have created most of it but im now stuck with a few bits as im still new to Excell.

1. How to freeze the data in a cell after a certain date has passed (the data not the formula that is in there)

2. when creating new Players/teams into a league how can you copy a template add name and all formulas in the cells to change with it without having to manually input every cell?

Hello friends i need a formula in excel to separate the mobile number and zip code into different cells

Here is my sample cell to separate.
Bellow total in one cell so i need a 3 different cells for address, mobile number, zip code.

24 103/1/1/A, LAXMI NARAYANA NAGAR, UPPAL, HYDERABAD, HYDERABAD, TELANGANA,9866256934, 500013

Thanks in advance

extra data into excel from websites that require a login

All,

I looked around and didn't find another post that addresses my questions so I'm making a new one. See attached spreadsheet -

1) If I want to automatically download data from a website that requires a login -- password, login ID such as email address -- fake example (www.bloomberg.com/peanut_prices.xls) and APPEND the data into the attached workbook (Sheet1), starting at cell A3. I say APPEND because in the event that the column width of the downloaded data goes beyond cell F3, I wanted included everything without overwriting cell G3 and beyond.

Rearrange Data from Sheetl to Sheet2

Hi All,

Please check the attached file first.

What I want:

1. In Column A if not found:"P.O.Box:" Or "City,State Post code" Or "Only One Word" Or Or "Phone No" then nothing change just copy to sheet2 same Column. But if found above any one out of 4 types data then cut data to representative column in Sheet2.
2. Same for Column B

3. In Column C if not found: "City,State Post code", Or "Only One Word" Or "Phone No" then nothing change just copy to sheet2 same Column. But if found above any one out of 3 types data then cut data to representative column in Sheet 2.

Macro needs to copy the correct info in the correct column, please help

Hi,
I was wondering if someone can help me.
At the moment the most of the macros on this spreadsheet are working fine.
However, when I filter the Revenue Report tab (yellow tab) by confirmed, and then go to the black tab (invoice audit) and press the copy from yellow tab button, it copies most of the data correctly.

However there is something its doing incorrectly.
One of the columns thats copying over, is copying it incorrectly. Here's what it should do...
I need that whatever is in column J on the yellow tab (Revenue Report), to copy to column I on the black tab (invoice audit).

how to insert a formula that can take info from sheet 1 to sheet 2 but under conditions.

greetings everyone. i need help to copy specific info from sheet1 to sheet2. its hard to explain by typing but ill show it through the attachment. many thanks.

Cumulative production that stops once order qty met

Hello,

Using the data below I need to take the quantity 8600 and break it out into qty per hour using the throughput shown. Once the sum of the quantities (cumulative production) is equal to the total quantity (8600) I want it to stop adding. As you can see in the example below it went too high to 9000. I want it to stop once it hits 8600 and all subsequent time periods will show 0.

QTY Throughput 6am 7am 8am 9am 10am 11am
8600 30 1800 3600 5400 7200 9000

I've tried all kinds of different if statements, but no such luck. I would greatly appreciate some help.

MODE function

hi all, ive a problem using MODE function.

im using Excel 2007 and got no problem before.

example, i have a bunch of phone numbers let say:

[B2]
1234567
8856941
3571592
3625148
8871567
1679248
3397415
6546546

then im using MODE function for first digits. [N2] =MODE(B2:B999)

it will come out like this =

[N2]
1
8
3
3
8
1
3
6

after that, i group first two digits of each numbers. [G2] =CONCATENATE(B2,C2)
its come out like this:

[G2]
12
88
35
36
88
16
33
65

Test of data in rows

I have a set of data where column name is month and cells in columns under each month have a quantity in them. The number can be positive, negative, zero or null. I want to look at one column and first test if it has a negative number, second, test the rest of the values in the row to see if there is a positive number in any of the columns. So for simplisity, let's start with four columns and three rows of data.

May. June. July. August

5. 0. Null. Null
Null. Null. Null. Null

How to add a Row in a new worksheet with new data when there is change on a particular cell

By using track changes Marco we can see who, which cell and what changes made. Is it possible to add as a new row in separate excel with new data. So when ever a change is made on a cell. It should add a new row in new excel for eg. we can have serial no. as default value and when there is change next to serial no. cell it should add as new row in another excel

User input data to stay in same row as variable data

Hello, what I am trying to do is create a "Notes" column, in which the data in the relative cells remains in the same row as a variable number. For example, in the attached Image, the whole table which includes the column "A/R Cust" varies each week. In other words, the A/R Cust number may move 3 or 4 rows up or down, depending on which customers are added or removed, but I want the notes that a user inputs to remain in the same row as the customer number. I have tried for hours and hours trying to find a formula or VB that will work, and some things get close, but just never do the trick.

Screen Shot 2015-10-27 at 11.35.53 AM.png

% formula for under 24Hours

Can anyone please give me the formula for a percentage at the bottom of column E. The data in Column E is hours and minutes eg. Row 3 Column E is 20 hours and 55 minutes. I need the percentage of how many jobs (each row is a job) are being performed in less than 24 hours. Thanks.

How to apply multiple filters based on multiple criteria

i am looking for VBA code for below objective there are three sheets

1.Raw data 2.Criteria 3.Result

Raw data sheet has 5 columns ( country, state, district, name, age ) , 80 thousand rows, may be duplicate rows also

Criteria sheet has 3 columns (country, state, district) , 20 rows. unique values

i need to apply filters in raw data sheet with visible values of criteria sheet , if values are not found in raw data sheet , values should highlight in another color in criteria sheet.

Copying Data and Trasposing it in Another Workbook

Hello,
I am totally new to VBA but I have been given a huge project that involves collecting data from across the plant floor and putting that data into workbooks for other engineers to analyze. It will ultimately have to email the appropriate engineers data if assemblies that fall under their jurisdiction fall out of spec. I am setting up the prototype now and wondering how to build a simple but robust script that I can easily configure in the future. The system on the plant floor generates CSV files.
Here is my question:

File with selections

Hello,

I would like to create an excel spreadsheet that will extract from a data base sheet with various columns : name,category and group I would like to extract this information in another spreadsheet with the possibiliyt to do different sélections on different days and post it on the main sheet after doing a selection.

Selecting random cells based on criteria

Hi I have a sheet that contains a few thousand entries.

In column "D" I have a value assigned to each entry (A, - W)

What I want to do is select a random set of entries for each of the criteria in column "D" and return a list of cell values that are in column "A"

However the number of cells I want to return changes for each criteria

So for example If cell in column "D" contains an "A" I want to return the value of the corresponding cell in Column "A".

So far so good?

The next twist is that there is a variable number of entries for each criteria (A, B, C, etc... ,W)

pull text from multiple fields in multiple workbooks and create a new row in different workbook

I am a newbie and this may be a simple task but I've searched exhautively and I can't seem to pinpoint what I need to do. I have a template I've created that generates a new sequential number each time it's opened (at least I've gotten that far on my own). I will be contantly creating new workbooks each day from this template with and I'm doing "save as" so I have a new file each time. It's called ICCtemplate and the unique files will have be ICC**** (the next seqential number).

Macro to take a table with one to many customers with multply invoices and creates flat files per cust with multiple invoices

I need help writing a macro that can take a table with multiple records per customer number and generate a flat file where there was a single record per customer and each of the subsequent statement records with the same customer number were placed into order columns in the worksheet.

I have attached a sample table with several customers with multiple records each.

And then there is a list of records where the looping and offsetting have created one long file for each customer #.

Access VBA code to run excel macro(having code for EssBase retrieve)

Hi,

If anyone can help me on below, it will be a great help for me.

I have an excel file with 2 VBA module:
Module1: Essbase declaration
Module2: Macro to prepare excel report including essbase retrieve.

When I run Module2 macro in excel it works absolutely fine.

Now, I want to do it with access as below:

I have prepared a form, created an option button. I want the Module2 macro to be run as soon as I click on that option button.

Is this possible. Please let me know.

Many Thanks in advance.....

PLEASE PLEEEEEEEAAAASSE help me DDE excel to excel

Hello ..
I have a tp to submit after some hrs .. I was working on this  tp all week and I can not find a solution
  this problem is to make a DDE link between two excel file "Server and Client"
the server contains a scroll bar that displays a value between 1 100 and in range ("A1"),

4 contains the client control button
Walking to boot the link

stop to stop

Reset to delete all

Untitleddcd.png

VBA to search and return data associated with selected data

Hello, I'm having trouble working this one.
In column C / Column E / Column G / Column H /
1-26-G / H / 1 / 13 /
2-29-L / P / / /
4-9-D / L / / /
1-12-C / F / / /
6-37-C / D / / /
1-13-E / C / / /
3-22-H / G / / /
1-13-E / E / / /

Splitting letters from words in two different cells

Hello,

I have two cells, "2015" and "3Q'15"; I'm wondering if there is a function that I could paste into another cell that would get me "20153" from these two cells i.e. adding the first number of the second cell to the first cell.

I would really appreciate your help, thank you!

C

Please help! I think this is something simple and it's similar to transposing

I have column A with case numbers and column B with names. It's basically listed row by row (Example A)and I want it to be listed like Example B with each name listed in columns and not rows.

I'm sure this is something simple, but nothing I've done so far is working and I'm hoping someone can help me with this.

thanks in advance

Examples A and B

Merge Large Data Worksheets

I have been using the VBA code for merging multiple worksheets into one sheet given below:

Sub Combine()
Dim J As Integer
On Error Resume Next
Sheets(1).Select
Worksheets.Add
Sheets(1).Name = "Combined"
Sheets(2).Activate
Range("A1").EntireRow.Select
Selection.Copy Destination:=Sheets(1).Range("A1")
For J = 2 To Sheets.Count
Sheets(J).Activate
Range("A1").Select
Selection.CurrentRegion.Select
Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select
Selection.Copy Destination:=Sheets(1).Range("A1048576").End(xlUp)(2)
Next
End Sub

VBA Trouble - Help with code to hide and unhide worksheets

I have some code that hides and unhides a worksheet in excel. I have attached my spreadsheet for reference.

So far if I click yes for 'Investigations" the worksheet 'site details' appears and if I click no it disappears.

My problem is that if I click no for another category e.g. 'dispersive soils' then I don't want the 'site details' sheet to disappear as it is ticked as a yes in another category.

Is there code that can help me?
I am fairly new to VBA so any help will be greatly appreciated.

AVERAGE IFS only for visible values or SUBTOTAL AVERAGE IFS

Hello ,

I need a formula that search only visible values after filtration with multiple criteria , like AVERAGE IFS but only for visible values. I found a formula that combines AVERAGE IF and SUBTOTAL but you ca only put 1 criteria :

=AVERAGE(IF(SUBTOTAL(3,OFFSET(Table2[[#All],[Time from log to close]],ROW(Table2[[#All],[Time from log to close]])-ROW(Table2[[#Headers],[Time from log to close]]),0,1)),IF(Table2[[#All],[Created By]]="Albena M. Atanasova",Table2[[#All],[Time from log to close]])))

I have tried to put another criteria like this but it dos not work :

Excel 2010 not pasting formulas

I was upgraded excel 2010 and my old version excel 2007 file copy and paste to excel 2010 formulas not pasting. Anybody knows post me?
When i was pasting the error is

Data on the clipboard is not the same size and shape as the selected area. Do you want to paste the data anyway?

Index Match 2 Sheets Problem Need Help

This should be simple but I'm stuck for days and spent 8 hrs on this today alone. Q1 I would like to look up the number of games played on Sheet 2 in column A for the correct first and last name and place it in Sheet 1 column D. I tried =IF($A3=0,"",INDEX('Court 1'!$A$3:$A$100,MATCH($A3&$B3,'Court 1'!$E$3:$E$100&'Court 1'!$F$3:$F$100,0))) but I get a #value error. Q2 I would do this for the average % Sheet 2 in column B to place in Sheet 1 column E for the correct name.

VBA select data then run count and place unique data once and show count on right

So I need a macro where I select the data in Column D starting at row 20 down the column how ever much data there is. then run macro that counts the letters in this selected data and place the first letter into column E at row 20 and the count to the right in column F. count meaning how many times this letters shows up in the data.
for example:
column D Column E Column F
H H 2
H P 3
P L 1
L F 1
F D 1
P C 1

Syndicate content