Question and Answer

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

Help with a formula to compare columns for deduplication efforts

Sorry, my description title might not make that much sense. See attached. (none of those are real names/dobs, btw)

I want to put a formula in column "M" that basically says to look at column b and if those are the same (they are paired off that way) then compare column L. If column L is the same on both pairs, then I can basically ignore those records because all the information matches. If not, then I need to look at them individually to determine if it refers to the same person and then do the actual fixing in the main database system.

Auto Copy result to a new Cell on refresh

I was wondering if there was a way to auto copy a cell to a new cell each time the worksheet is refreshed. Currently the result is in cell Z4 and I want them copied into cells AA5:AZ24. Using a new cell each time.

Thanks for any input as I haven't found anything like this.

EXCEL MACRO ERROR

Dear All.

Whenever i want to import a normal excel sheet to macro enabled excel sheet it shows following error message

MS EXCEL: Result data import Process has been interrupted due to error.

Please help me to solve this problem.

automation of display notification change as "invalid data" once xls file save to local drive

Hi team,

I want to automate an xls file located to share drive, If any body saved into local drive, there should be a notification in xls sheets as "data not valdated".

nested AND and OR statements - help

All,

Take cells: A1, B1, C1 where cells B1 and C1 may either a number (such as 0, 20 or 99) or blank (as in a blank cell or "")

I would like to accomplish the following:

1) Write the string or text "Both" in A1 IF and ONLY IF the content of both B1 and C1 are NEITHER of the following: negative, 0, blank ("").
If the above fails (meaning either B1 or C1 is either < 0 or blank), verify if B1 >0 and not blank ("") - if so, write "Giver" in A1
If B1 fails the test (which means, C1 is positive and not blank), write "Taker" in A1

Changing defaults in file requester boxes?

Mac Excel 2011 v14
See attached images. When saving a file in CSV format, the first file requester has "Save" highlighted as default. The second file requester "This workbook has features not supported..." has "CANCEL" highlighted as default, rather than "CONTINUE".

This causes the user to mouse click "continue" which is time consuming for many files.
Is there a way to change the default of this box to "Continue" rather than "Cancel"?

On a related note... the Windows version has "Continue" as default.

1.jpg

VBA Macro Code to duplicate row based on the value from a cell

Hello

I found on the internet the VBA code to duplicate a row.

I have products (name, description, prices ect ) on every row. On Colum H we have the quantity mentioned.
When I use this VBA Code in a Macro I get error message "Error 13 during execution: type kis not corresponding" (I translated from Dutch)
The following row is Highlighted

timesToDuplicate = CInt(Worksheets("Sheet1").Range("H" & currentRow).Value)

I hope somebody can help me out?

Kind Regards,

Peter

The routine is.

Sub DuplicateRows()
Dim currentRow As Long

Problem in Conditional/ Logical Operation in Excel VBA

Dears,

I have tried the attached code and the result is also attached. The purpose of this code is to check the temperatures (cell A13, A14, ...) if it falls between the values in cells B8 &B9. If it does, the font color should be blue with the cell filled with yellow color with the word "True" in it. The problem is that: cell B23 must be "True" and it is "False". What is wrong with the code?

Note: In the code,

N_Cold_Streams= 5

Tot_counter = 60

Those variables are just to continue the checking further.

Regards,

How to extract just email addresses from a text record?

Hello does anyone know a formula to extract just the email addresses from files with records as follows:

aaasilv@terra.com.br;85.72.201.151;Athens;Attiki;Greece;20/07/2015;Nao;Sim;;;;1430833559
aabmeneses@terra.com.br;187.90.44.115;Salvador;Bahia;Brazil;20/07/2015;Nao;Sim;;;;3143249011

I have a total of 25,000 records for this extraction so a truncation solution would be appreciated!

The text required for each of the records above is:
aaasilv@terra.com.br
aabmeneses@terra.com.br

Thanks

Create a Macro that will delete a cell range on print

I'm trying to do something like this:

Sub Clear_Cells()
worksheet ("Data").range(C1:C11).clear contents on print

End Sub

But doesn't work. Any ideas.
Any help would really be appreciated

Thanks, Rob

Create a Macro that will delete a cell range on print

I'm trying to do something like this:

Sub Clear_Cells()
worksheet ("Data").range(C1:C11).clear contents on print

End Sub

But doesn't work. Any ideas.
Any help would really be appreciated

Thanks, Rob

Message from Web Page

I have a VBA Program that logs into a web site, selects one web page, scrapes certain data from that web page then goes onto the next web page and repeats the process. There can be a few thousand web pages at the web site that I collect data from. The program is up and operating and collects the desired data.

Using formulae to automate cell referencing

Hi all

I have spreadsheets running with columns for each month in a year, for several years.

In each column I have a data set, and I have a COUNTA formula inserted in each column to determine the number of data instances in each column.
(There are no blanks)

In addition, in each column I have different COUNTIF formulas inserted.

Each column has a different number of rows of data.

The first formula I always refer to is say, C1=COUNTA(B10:B20017), which returns a value of 14166.

Currently, for each month, for each column I am typing in further formulas, say:

Recording Open Price in Excel

Hi,
I have a live price feed for the Australian market in my excel sheet. I would like to record the opening price on the first trade price of each day for the particular stock.
Looking at the screen shot:
In the event that both the following conditions are met:

1. Cell A6 = Cell $B$1 &
2. Cell $B$4 > 0

A macro should run that copy pastes the value in Cell $B$3 into B6.

This should automatically repeat for each day going forward.

Any ideas for a code to achieve this in VBA?

Thanks
Erik

Delete matching numbers from excel file via batch file or VBA

Hello,

I have 2 excel files in one specific folder named as A.csv & B.csv.

There is a column Ref in excel file 'A' and Proj column in excel file 'B'

Ref column in excel A has numbers e.g. 9826218802031230101, 9826218803031230101 and so as Proj Column in excel file B.

I want to compare these 2 columns via batch file and create another excel file which will delete any matching number between these 2 files of numbers which have '02' in the position 9 & 10.

I will be very thankful.

Allocating spending over periods in general ledger workbook automatically

Hello! I am trying to figure out how to allocate spending over periods automatically in a general ledger budget spreadsheet I have for our IT Department. On the Itemized Expense and Cap Ex tabs in the workbook, expenditures are automatically sorted into monthly and yearly spending categories on the first two tabs based on their IT Code. This works well, except it does not allow for prorating spending. For example, if we were to buy a laptop for $3600 on April 1st, 2015 that has a useful life of 36 months, all $3600 would not be recorded in April.

VBA code to find 3 values in a range and mark that record as Matched

Hi Experts,

I'm new to VBA/Excel Marcos and i'm building a solution that pulls 3 columns from one excel sheet(Source) and 3 columns from another excel sheet (Target). I need help with VBA code pick 3 columns at a time and search for match in target. In next column mark that cell as "Matched" if match found. If no match highlight source row.

Refer to the attached sample sheet and guide with solution.

Regards
Kumar

Splitting International Dialing codes into country and area code

Good day,

I have the following columns :

A
Dailing Codes
1 93
2 937
3 355
4 35538
5 35566
6 213
7 2135
8 2136
9 1684
.
.
.
.
.
.
------

B
Country Codes
1 93
2 355
3 213
4 376
5 244
6 1
7 44
.
.
.
.
.

---------

Please assist with the following :

Scheduling VBA to Run and E-mail Every Hour

Let me start off by saying this is my first real time venturing into VBA. My only experience with it is when I hit the "Record Macro" button in Excel and maybe edit it to look at what it does. I'm in the process of taking some classes but until then, I need some help.

I have a report that I would like to have refreshed every hour and then e-mailed to a set of e-mail addresses. The current Macro is pretty basic. It essentially puts the current time into a few of tabs and then refreshes the ODBC connection.

Sub Refresh_Report2()
'
' Refresh_Report2 Macro
'

'

Macros error when locking cells

Hello!

I don't know anything about macros and I need to find the answer to my question fast. My apologies to all for that. Not lazy, just out of time.

My issue (other than not knowing anything on the subject):

Find value

I have a spreadsheet and I need to find a value which corresponds to a row and column.

My formula - =INDEX($B$2:$L$8,MATCH(B13,$A$2:$A$8,0),MATCH($A$11,$B$1:$L$1,0))

My spread sheet.

Pts 10 11 12 13 14 15 16 17 18 19 20
7 75 80 85 90 100 105 115 130 140 150 160
6 35 40 45 50 55 60 65 70 75 85 90
5 30 30 35 40 45 45 50 50 55 55 60
4 20 25 25 25 25 25 25 25 25 25 25
3 15 15 20 20 20 20 20 20 20 20 20
2 5 10 10 15 15 15 15 15 15 15 15
1 10 10 10 10 10 10

15 <- $A$11

B13 -> 7 #N/A

Help modifying code to transfer data to continuation sheet please.

Having problems with VBA code below transferring rows & columns from sheet2 (armele) to sheet1 (Purchase Order) starting at "Materials" & "Price rows & columns (F14:I33) down to (F33:I33) then continuing with next column on page1 "Materials" & "Price" rows & columns (O14:T14) down to (O33:T33).

Would also like it to continue to page2 "Materials" & "Price" rows & columns (F39:I39) down to (F:68:I68) then to "Materials" & "Price" rows & columns (O39:T39) down to and finishing at (O68:T68)

Please see code below and file if needed - Thanks!.

Option Explicit
Option Base 1

Import text file with lines of variable length into Excel using VBA

I have a VBA enabled sheet with buttons that perform various tasks including dumping 4 lines of IP addresses into a text file. A sample text file is below:

192.168.44.12
192.168.44.123
192.168.33.111
192.168.44.1

At the end of my run, it reads the contents of the text file and places each line in specific fields (not in row vertically) in the sheet.

Right now I'm able to do this if I already know the length each line but it will be different each time.

Can anyone help?

Help with creating a macro for my formula

Hi, I need a macro that will utilize the below formula for column D(Starting at D3), range = # of rows that have data in column A. Thank you for any help you can provide, I have been trying to get this for quite some time!

Excel automation without using macros

Hi

I am not an expert in excel...I actually want to automate date in all the worksheets (8-9 worksheets ) once I enter data in the 10 data worksheet. As of now I have to manually go to each and every worksheet, refresh and format the data using format painter.I have to work on this report weekly

Any help will be appreciated.

Thanks

NEED A HAND RUNNING MULTIPLE MACROS ON ONE

HEY EVERY ONE I HAVE MULTIPLE DATA VALIDATION DROP DOWNS THAT I WANNA RUN A MACRO BASE ON CERTAIN SELECTION I GOT IT WORKING FOR THE FIRST DROP DOWN BUT CAN GET THE SECOND ONE TO WORK

Private Sub worksheet_change(ByVal Target As Range)

If Not Intersect(Target, Range("al9")) Is Nothing Then
Select Case Range("al9")

Case "smooth016": SMOOTH016

Case "smooth020": SMOOTH020

Case "stucco016": STUCCO016

Case "stucco020": STUCCO020

Case " ":

End Select
End If
End Sub

Sub BANDS()

If Not Intersect(Target, Range("AO9")) Is Nothing Then

Urgent need help for excel

Hi sir/madam

Hi need urgent help for excel formula. I have data from cell A2 to A11 and I want that top 35% will get $4000.00. and next 35% will get $2000.00. and rest 30% will get $5000.00 in cell B2 to B11.

Please help me urgent

Kind regards
Vinod

Huge Permutation Problem

Hello. Please could I have some advice to help solve a problem which has an extraordinary amount of permutations. I feel like I have got lost in the numbers somewhat and could be missing a relatively simple way to solve the problem.

I have a simple sheet that records 100 bets and each bets potential winnings.
Each bet involves 4 teams, one from each of 4 leagues (entitled League 1, League 2, League 3, League 4).

For a bet to be successful ALL 4 TEAMS MUST WIN. If any of the 4 teams does not win the return from that bet is £0.

There will only be 3 winning teams from League 1,

image.jpg

Automatically insert saved template into new worksheet

Is it possible to set up a function so that when a user hits the Insert Worksheet tab, my saved template auto inserts into this new sheet (without having to right click / insert)?

how to change the value of a cell based on a comaprison of 2 other cells

Friends

I wish to evaluate the value of 2 cells and if equle change the value of a 3rd
so if i have 3 colums

b c d
111 222
222 333
111 212

if c1 is == to b2 change d2 to something , like make it a 1 , or blue
in the above this is True 222=222
and this evaluation goes down the columns
if c2 == to b3 change d3
and in this case it is not , 333 != 111 , so do nothing
and march down these columns in this stair step evaluation

Thanks

Syndicate content