Looking Up 2 Conditions Before Performing Another Task?

Jul 12, 2013

I'm a fairly new user to using VBA and I'm currently running into a little snag. I'm trying tu create userform which will let me know if a person already exists in my sheet by looking up the last name in "A", then looking up his first name in "B", if such entry exists then display a message saying " Yes". If entry user has not been entered in the sheet then use a combox, to select the reason , then choose a date ( i have a working date picker ). Then entry should be entered in sheet (Name, Surname, Reason, date).

Whats working, I can use all of the above to enter all the info into the sheet, what I need to do is verify if user is alread in there, if not, then add it. The so on and so forth

View 3 Replies


ADVERTISEMENT

Performing Calculations On My Comments!

Feb 26, 2008

i've managed to get a set of cells to show (with comments) what the last weeks data looked like. (so cell value = this week, comment contains last week)

What i now want to do is to use conditional formatting to highlight any major differences between the figures... so:

My comment i'm sure is stored as text in the format:

Previous value was
xxxxx

So the first thing i'd need to do is to to strip out the text at the start, and then perform the calculation.

View 9 Replies View Related

Do While Loop Statement Not Performing

Aug 5, 2008

I have the following code which previously was showing an error on the Do While line. It was suggested that I change the line too Range("B2").Text. However, the loop is not deleting the rows based on "#N/A". Can anyone offer any suggestions?

Selection.Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlGuess .....

View 9 Replies View Related

Data, Performing Functions, And Percentages?

Mar 13, 2009

I have a very large grid of data, about 400Rx200C, which contains a lot of blank fields. All of this data is currently in values from 0-100 representing percentages, but not formatted as such. I need to make all of these values into Excel Percentages so naturally used Paste Special and Divide from a field with the value 100 in it and then simply format the cells as %.

However, this fills in all of the original empty cells with a 0.000% which I do not want, I need them to stay blank. And some of the cells that do have values also have 0.000% so I cannot just delete all of these values with a VBA script. I had been hoping the Skip Blanks option would do this, but it does not unfortunately.

View 3 Replies View Related

Opening Files While Performing Vlookup

Sep 22, 2009

I am trying to write a Macro that will do the following.

1. Using a new workbook
2. Open a file in a in a directory. Then
3. Run a vlookup using the opened file as the filename in the vlookup
4. Paste the results of the vlookup into the original file next to the file name.
5. Close the file and open the next one in the folder.

The folder contains about 2k files that it needs to loop through. I found a macro on this site created by Ravishankar and attempted to add to it. Not going so well.

View 2 Replies View Related

Subroutine Stops Before Performing All Commands?

Jun 17, 2013

I have two subroutines. One subroutine updates some figures on spreadsheet 1, and then calls a subroutine that updates some figures on spreadsheet 2. Spreadsheet 2 is supposed to save and close, and return to spreadsheet 1, but it only gets as far as opening spreadsheet 2 and updating the figures. These are the two subroutines:

Code:
Sub UpdateLegalAndMeans()
Dim wBook As Workbook
Dim count As Integer ' counter for counting down backlog figures

[Code]....

View 4 Replies View Related

Setting Range Of Numbers And Performing Subtraction?

Mar 28, 2014

I am creating a range of numbers from 1 to 2000 with increments of 0.5. Then I have to subtract certain range, for example, 100 to 350. So, the result should display, 1 to 95.5 and 350.5 to 2000.

View 4 Replies View Related

Assigning Value By Performing Search Relative To Position

Jan 19, 2012

The data is a copy of CSV file in to a spreadsheet. Below is what the paste looks like:

100100 Books
1234.ab
1345.bf
1456
1567
100100 Books
100200 Magazines
100300 Videos
1234.ab
1345.bf
1456
1567
100300 Videos

All of the numbers between the 100100 Books, 100300 Videos belongs to that category. This repeats hundreds of rows down. I need the column to the left of this range to display which division it under. I parse this in excel so Books, Videos, Magazines will be in their own column. I am not exporting the CSV so have to manipulate it in excel. I need to have the column to the left combine the whole identifier so I can perform a VLOOKUP on it. It should look as follows:

100100.1234.ab
100100.1345.bf
etc.

My approach was to get the column to the left of the range to display the correct division, then have another column combine by using (cell)&"."&(cell).

View 1 Replies View Related

Breaking Time Into Intervals And Performing A Count

Nov 20, 2006

Office 2003 with Windows XP

This is my first post so i may not have done everything correctly. I tried doing google searches to see if anyone else has done something similar but its a tricky thing to search for. I have found pages dealing with manipulating time but none seem to be what I want

I have an Excel sheet with data

A1=date
b1=source
C1-h1 all contain data (name, location, etc, etc) but I am not interested in those.

A1 (the date cell) is formatted like: m/d/yyyy" "h:mm:ss AM/PM

[Sample]

a2 = 8/1/2006 12:20:23 AM b2 = phone
a3 = 8/1/2006 12:21:13 AM b3 = email
a4 = 8/1/2006 12:33:03 AM b4 = phone

This is what I am trying to accomplish:
I want to break each hour, whether it contains data or not and get a count of the different types of source

my desired output would be:

time Phone email
12:00AM
to 2 3
12:30AM

My problem occurs because I am unsure how to break the times down into intervals. In my head, I would create a new column and try to break the time up into an interval. So for a2 (8/1/2006 12:20:23 AM), I think I would need to break the date and time up and then determine which interval would be needed based on the time.

I was going to perform the following:
=text(a2, "h" + if("mm:ss">30, 30,00)

Basically, pull the hour from a2 and evaluate the mins/secs.

If the min/sec is bigger than 30, put a 30 in the box. Less than 30, put double zero in the box. So for 8/1/2006 12:20:23 AM, b2 would have 12:00 since it falls in the 12 to 12:30 interval.

Once I have all the intervals, I would also need to preform a count on the source cell but I think I can use a vlookup to get the count for the interval.

View 9 Replies View Related

Formula Stops Working After Performing Certain Tasks

Nov 21, 2006

I was given the following formula by Domenic some time ago that I use along with VBA code supplied by Fin Fan Foom to open do a lookup on a closed workbook:

=If(ISNUMBER(MATCH(MIN(If( Date=D2,If(ABS(Time-E2)<"0:30:30"+0,ABS(Time-E2)))),If(Date=D2,ABS(Time-E2)),0)),INDEX(Contact,MATCH(MIN(If(Date=D2,If(ABS(Time-E2)<"0:30:30"+0,ABS(Time-E2)))),If(Date=D2,ABS(Time-E2)),0)),"")
Everything works fine, until I attempt to…
- cut & paste a block of cells, or
- do a SaveAs, or
- change a worksheet name

The formula will no longer function after performing any of these tasks (the cells go blank), and I have to close the workbook without saving to preserve the original workbook functionality. All other tasks, including even importing of different files into the workbook have NO negative effect.

The formula uses an “INDIRECT” named range. Sheet name changes are reflected in the named ranges, but any change of names somehow causes a malfunction (no sheet names are referenced in the VBA).

I thought that the large lookup workbook (40,000 rows) may be a problem, but even after deleting most of the data and retaining only a few rows, the problem still remained.

After the formula cuts out (after performing the above tasks), if I open up the lookup file, then the lookup will work again, but if I close the lookup file, it will stop working.

I doubt the problem is in the VBA code since IT WORKS, and besides, I have other simple VLookups formulas that also uses the same process (and VBA code) and they continue to work just fine when that one formula gives out. The only thing I can think of is that the complexity of that one formula may be an issue.

Anyway, I the original thread is long, so I’m starting a new one here. The original thread is here (Domenic’s formula, pg 7; FFF’s code, pg 8):
Dedicated Cell To Choose Lookup Table

View 9 Replies View Related

Performing Worksheet Functions On One Column Of A Two Dimensional Array?

Nov 19, 2009

I have an array with dimensions (5000,30). I want to perform a worksheet function "Percentile" on specific columns within the array. So for instance I may want to know the element falling at the 50th percentile in column 5 of the 30 column array. Is there a way to do this without having to place the array onto a worksheet?

View 4 Replies View Related

Removing Duplicate Information In Same Cell After Performing VLookup?

Apr 8, 2014

I have used a vlookup code from a past post (Vlookup multiple values in one cell) in VBA and successfully retrieved my information to one cell.

However, I would now like to remove any duplicates in this cell; preferably while running the same code.

--vlookup code
Public Function mVLOOKUP(mlookup_value As Range, mtable_array As Range, mcol_index_num As Long)
Dim r As Range

[Code].....

View 2 Replies View Related

Locating Next Similar Condition In A Range And Performing Calculations

May 11, 2007

I have a set of data with names in col A, Currency in col B, Amount in Col C. I want to convert all the amounts in NON-USD based on exchange rate I input daily into column D.

How do i search down the row for the next name that is denominated in GBP / YEN etc and keep converting until I dont find any more other currencies in it. I tried to improvise on the finding nth but couldnt get anything out of it. Have attached a spreadsheet.

View 9 Replies View Related

Performing A Specific Function Repeatedly But With Variable Values Each Time?

May 13, 2014

The spreadsheet has over 200K rows and two dozen columns. My job is to:

1. There are two columns, one is called OCR code where we have repeating ID's and other column is called Minutes Count which is basically a number. I have to filter the OCR column for similar OCR codes(values) and then add their time(Minute Count) so that I get total minutes for a specific OCR code. After adding the min I will copy them into a new sheet with the code in one column, total minutes in another and number of repeatitions for that specific OCR code or count number in a separate column. Example:

OCR_Code; Minutes
54xg; 456
45fk; 65
23IS; 18
54xg; 971
45fk; 265
.
.
.

Now I've to filter 54xg so that I can only see it and its corresponding minutes. Then I will add up all min for 54xg. Then I will count the number of instances a 54xg has been repeated in spreadsheet(here its 2 but it can be in hundreds in my case). Last thing is to transfer all this data to a new sheet. And automatically repeat the process for other OCR codes like 45fk, 23IS etc...

View 3 Replies View Related

Test X Conditions In Conditional Formatting: Highlight Cells Is Two Conditions Are Met

Oct 17, 2007

I would like to highlight cells is two conditions are met:Cell = 0Offset(0,-1)>0I tried the conditional format wizard and entered a formula: =IF(AND($J2=0,$I2>0)) But I keep receiving formual errors, which I understand, because it appears to be incomplete formula. But I am not sure what else I need to add to the formula in the conditional format wizard

View 2 Replies View Related

Performing IF Cell Contains Number THEN Copy That Number ELSE Give 0

Jun 14, 2013

Looking for a way to search an active cell (that has been found using macro) for numerical data and if there is some present paste this in a different location

If there is no numerical data in this this cell then paste a 0 in a different location

An example of the string contained in the cell

Product 7.5% wheat <- i would want 7.5 (or 7.5%) copied to a different cell
or
Product X <- i would want a 0 copied to the cell the 7.5 would be in from the above

I can find the cell to search in, i just do not know the correct way to extract the information I need.

View 9 Replies View Related

Cannot Complete This Task With Available Resources.....

Nov 26, 2008

Excel cannot complete this task with available resources. Choose less data or close other applications. My file is only about 3mb in size, made up of 17 worksheets. These sheets are calculated by referencing to another file that contains all of the background data. The data file is also about 3mb, made up of 13 worksheets.

There are probably about 2 - 3 thousand formulas in the file in total, ranging including vlookups, sumifs, sumproducts, etc. When the data was contained within the file there was no problem. I moved each data sheet into a new workbook to trim the size of my file and also stop the incessant calculation and this is when the problem started. Now, when I open the file and am prompted to update, it will update to about half way and then throw up the error message!

View 4 Replies View Related

Next Occurrence For Specific Task

Jan 11, 2012

I have 2 sheets with a formula in sheet 2 looking to pick up information from sheet 1. the formula in sheet 2 is:

=HLOOKUP(C8,'Cost-Effort'!$B$7:$AH$42,26, FALSE)

But C8 appears in W7 and X7 in sheet 1 and will only pick up the first Occurrence and I need it to pick up the second Occurrence for this specific task.

View 6 Replies View Related

VBA In Cloud With Task Scheduler

May 6, 2013

I have this excel workbook with VBA code that starts when the workbook is opened.

Every day at 12:00 the windows task scheduler opens the file (hidden). The problem is that my computer is not always turned on at 12:00 hence it would be better if I could store the file in the cloud and run task scheduler from there.

In an optimal world there also has to exist a dropbox connection.

View 2 Replies View Related

From PDF To Excel - Any Way To Automate This Task

Jun 6, 2013

I have a PDF sheet with info laid out like this:

Code:
Peter Paul Mary
Text Corporation
One two three street
Mars, New York 90000 USA
phone: (111) 555-2222
email: tellmewhy@yahoo.com

There are 10 names and addresses like this on each PDF page and the entire PDF file has 50 pages so to manually copy and paste each bit of info into separate cells on the spreadsheet's appropriate cells "Name, Company, Address, State, Phone, Email" e.t.c is too difficult.

View 1 Replies View Related

Perform Task Only If Cell Has Value

Jul 29, 2013

I have a large spreadsheet set up with multiple rows, I have the formula -

=a5&"repeated text"&c5

this brings back 2 results

test repeated text test
repeated text

In the instance this is the latter with no combined cell vale, how would I mass delete them?

View 2 Replies View Related

Repetitive Task - Different Output?

Nov 6, 2013

I need a macro in a excel for the below scenario:

1)i have merged cells from A1:B3

2)if i click on a macro the output in the above cells should be as follows"

"Login to database"

3)if i run the same macro for the 2nd time the output should be:

"Are you done with the reporting?"

4)if i run for 3rd time the output should be:

"Logoff from database"

5)Say example if i run the same macro for 1o times i should get 10 different outputs....if i run for the 11th time the output should get repeat from 1st....

6)Output need not be in order....random also fine...

If possible gimme 2 different codes:

1)Output should be in the order wise from 1-10 and get started from1 again

2)Output should be random....

View 4 Replies View Related

Calculating Task Time

Mar 18, 2007

I have a sheet to calculate Time Elapsed based on StartDT & EndDt taking into consideration the actual working hours in any working day and the function exclude the weekend. I am not a guru in excel but i found this formula in this website .

=IF(AND(INT(StartDT)=INT(EndDT),NOT(ISNA(MATCH(INT(StartDT),HolidayList,0)))),0,ABS(IF(INT(StartDT)=INT(EndDT),ROUND(24*(EndDT-StartDT),2),
(24*(DayEnd-DayStart)*
(MAX(NETWORKDAYS(StartDT+1,EndDT-1,HolidayList),0)+
INT(24*(((EndDT-INT(EndDT))-
(StartDT-INT(StartDT)))+(DayEnd-DayStart))/(24*(DayEnd-DayStart))))+
MOD(ROUND(((24*(EndDT-INT(EndDT)))-24*DayStart)+
(24*DayEnd-(24*(StartDT-INT(StartDT)))),2),
ROUND((24*(DayEnd-DayStart)),2))))))
the formula works perfectly except for the fact that in our part of the world we have "Friday & Saturday" as the weekend days instead of Saturday and Sunday.

is there a way to get this formula or any similar formula to take different weekend days and do exactly what i need?

View 9 Replies View Related

Cannot Complete The Task With Available Resources

Dec 22, 2006

I need to work with a spreadsheet with 15000 rows of data. By the time I link this file with my final file and add formulas, my file has reached a massive size and the following pop up error message appears.

View 3 Replies View Related

Task Bar Buttons Moving

Jun 19, 2007

I am using code that creates a new workbook and then copies a number of sheets to the new workbook. I am using Application. ScreenUpdating = False but as the sheets are being copied over, the Excel task bar button jumps around.

View 2 Replies View Related

Monthly Task List

Sep 21, 2007

I am trying to create a task list from a master matrix of items to be completed. When fully populated the maters matrix should have approximately 200 items to be completed over the year. I want to create a monthly to do list in EXCEL based on the master matrix. Some reports will be due on various timeframes. The reports will also be assigned to different workers. I would also like to be able to provided brief instruction for each task. Items will be added and subtracted from the master list based on changing requirements. I would like each month to be a different tab in the workbook. Attached is a spreadsheet that better explains what I am looking to create.

View 7 Replies View Related

Run Macros In Scheduled Task

Nov 24, 2007

I've used Excel 2003 to write a macro to analyse some date from our internal proprietary database. I use some Perl to generate a bunch of csv files from the data, and the run the macro to generate graphs and statistics from that. What I would like to do now is run this entire operation as a scheduled task, so that, every week or so, the data is downloaded, the processing is done on the csv files, and the results are saved to a location to be viewed on our internal site.

I'm assuming that the best way to do this would be somehow run something from the command line (to be embedded in a script) which basically says "1) Open this csv file 2) run this macro 3) save the output to this location", but I can't figure out how this can be done.

View 3 Replies View Related

Write A Macro That Will Allow To Add Task To Webpage?

Mar 21, 2013

I am trying to write a macro that will allow me to add task to [url].... (task managing webpage) from data within excel. I could easily write a macro that emails the information to my toodledo email address, but this is not what I would like to do.ow to start the code utilizing Toodledo's API, which can be found here:

View 5 Replies View Related

Run Macro With Windows Task Scheduler?

Apr 29, 2014

Ive been looking at a bunch of examples, but everything that I have tried just gives me errors. what code to use to make a vbs script to run in windows task scheduler that will...

Open "J:GroupsBSHEETSSDANew EOD.xlsm"
Run the macro named "EODPrint"

Save the workbook

and close the workbook

Leaving excel open if other instances exist.

View 9 Replies View Related

Macro From VBA Create A Task In Outlook?

Aug 1, 2009

Can a macro from Excel VBA create a Task in Outlook?

I would like to have Excel create a task populated with a date in a given cell in Excel.

Basically, click a button and a task is creaed in Outlook based on the date in a given cell.

Is this possible?

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved