Unable To Run Script From Return Key

Dec 17, 2012

I'm using the code below to track changes in a Excel worksheet.

Code:
Option Explicit

Public preValue As Variant
Private Sub Worksheet_Change(ByVal Target As Range)

Dim cell As Range
Dim Rng As Range
Dim Rng2 As Range
Dim Rng3 As Range

Application.EnableCancelKey = xlDisabled

[Code] ........

The code works fine, except for this piece of the script:

Code:
If Target.Column = 50 Then

If Target.Value = "Yes" Then
Set Rng = Application.Union(Cells(ActiveCell.Row, "B").Resize(, 22), Cells(ActiveCell.Row, "W"))
Rng.Interior.ColorIndex = xlNone
Set Rng2 = Application.Union(Cells(ActiveCell.Row, "X").Resize(, 12), Cells(ActiveCell.Row, "AI"))

[Code] .........

If I add the word "Yes" to column "AX (column 50) and press the Return key, the above code i.e. the change of fill colour, doesn't work.

If however I enter the word "Yes" and select another cell by clicking in it, the code works.

View 7 Replies


ADVERTISEMENT

Unable To Set Range

May 9, 2014

I have a macro that looks for the last empty line( starting from the bottom of a range) the selects this line and clears it. The issue I am having is that it selects more the the range that it is coded for and for the life of me I don't understand why. This is the code,

Sub DelLastRowCols()
Dim sh As Worksheet
Dim yourPassword As String
yourPassword = "pswrd"
Application.ScreenUpdating = False
Sheets("Hrinput").Select
Sheets("Data").Visible = True
Sheets("data").Select

[Code]...

The Sheet "Hrinput" is the data input page, the sheet "data" is a seperate worksheet where all the data is kept. Currently this code will find the first used row from the bottom (row 478) but it will clear columns A- V of that row, not the A:F as defined. This range (A-F) is one of 5 set ranges, for 5 different data areas, on the same "Data" page. So when this macro runs it clears the data for the other 4 areas.

View 2 Replies View Related

Unable To Use Filters

Jul 10, 2007

I have a worksheet that is unprotected but I am unable to apply filters to it. The option is greyed out if I try and select autofilters.

Another strange thing is that on one of the worksheets when I select Data, Filters there is a tick to the left of Autofilter but it is also greyed out, so in effect I cannot turn it off even tho I can't see the filters!

I have tried to popst a screen shot but unsure how to do it. I think maybe a screen shot would help to explain my issue better so if anyone knows how to do this......

View 9 Replies View Related

Unable To Run VLookup Macro Using VBA

Dec 23, 2013

I tried running the below VBA codes and received a Run-time error '424': Object required.

Sub 1
Dim i As Long
i = 1
'Do a vlookup between column a in test1 worksheet against column a:d range in test1source worksheet

[Code] .....

View 6 Replies View Related

Unable To Insert Columns

Jan 8, 2007

I am unable to insert columns on any worksheets. Even a blank worksheet. The insert column function remains disabled. Work sheets are not protected. What can I do to activate this function?

View 10 Replies View Related

Unable To Unhide Sheets

Oct 21, 2009

I have a workbook with several sheets that I created some time ago. I have hyperlinks on the main sheet which point to other sheets in the same workbook which can be viewed when using the hyperlink, however the linked sheets are hidden. Somehow in this workbook I removed both the horizontal scroll bar and the lsiting of sheet names. I can not figure out how to get them back so I can unhide and or add new sheets.

View 4 Replies View Related

Unable To Send Email Using CDO?

Mar 20, 2014

I'm trying to send a basic email using example [URL]..... but just cannot get it to work.

Here's my code and the error I get is "Run-time error '-2147220978 (8004020e)': The server rejected the sender address. The server response was: 530 5.7.1 Client was not authenticated."

I found my smtp server by looking in Outlook properties so I know that's right and for all instances of "person@email.com" I am putting my email address and the password is the normal password I use to log on.

View 1 Replies View Related

Unable To Link In Certain Cells

Feb 1, 2008

I have inherited a workbook and wish to link certain cells from various worksheets.On one work sheet I am unable to selct any cell (cursor does not change) to link in and on another sheet there are a just a range of cells I cannot access - everywhere else works normally. There are no macros and the workbook is not protected.

View 13 Replies View Related

Unable To Subtract Outside IF Statement

Nov 8, 2011

I am currently having a problem with an IF statement. Currently this is my formula,

Code:

=IF(CZ2="TEST1",'DATA'!B241,IF(CZ2="TEST2",'DATA'!B243,IF(CZ2="TEST1(NEW)",'DATA'!B241,IF(CZ2="TEST2(NEW)",'DATA'!B243))))-DATASUBTRACT!CY19

The IF formula works perfectly fine, but when I attempt to include a subtracting to the back of the formula, I will receive a #VALUE! error.

When I create a similar IF formula in a new workbook, the formula allow me to subtract. I do not know why the code above is unable to subtract.

View 6 Replies View Related

Unable To Format Time?

Apr 12, 2012

I am building a very simple time management sheet and ran into a format problem.

I have two rows with cells formatted for Time 1:30 PM

Whenever I add a time(any time) into any cell, it always changes to 12:00:00 AM

The formula bar show the format as 1/8/1900 12:00:00 AM.

View 8 Replies View Related

Unable To Unhide Sheet?

Jul 12, 2012

For the following code:

Code:
Sub ShowAdmin()
Sheets("Admin").Visible = True
End Sub
I'm getting the following error message:
Run-time error '1004' Unable to set the Visible property of the Worksheet class

View 4 Replies View Related

Unable To Find Next Error?

Nov 13, 2013

Code:
For Each src In Worksheets
If src.Name Like "EF Spend*" Then
Sheets(src.Name).Select
Else
Next src
End If

This is an extract of a larger code, but this section is producing a Compile Error: Next without For but I cannot workout how to resolve it.

View 9 Replies View Related

VBA - Unable To Get Data For Recordset

Feb 28, 2014

I've Created Connectionstring for excel which is in database format and trying to get the data by comparing 2 sheets using he below code.. But not working..

Set ws = Sheet1
sSQL = ""
sSQL = "SELECT [Company Code], "

[Code].....

View 1 Replies View Related

Unable To Get Rid Of Compile Error In VBA

May 11, 2014

I am new to VBA. I have been getting compile error on the below code:

Public Sub hourCalculation()
Dim rcount As Integer
Dim rindex As Integer
Dim logintime As Date
Dim logoutime As Date

[Code] ..........

View 9 Replies View Related

Unable To Set Array Formula Using VBA?

Jun 16, 2014

why this doesn't work and I get 'Unable to set the FormulaArray property of the range class'?

Code:
.Range("D10").FormulaArray = "=INDEX(A13:A42,MATCH(MIN(IF(F13:F420,F13:F42)),F13:F42,0))"

View 6 Replies View Related

Unable To Undo / Redo

Apr 16, 2007

I am unable to undo/redo in MsExcel. Have tried to uninstall/reinstall office, all updated are current.

View 9 Replies View Related

Unable To Sort Correctly

Oct 23, 2007

I have a column with a value resulting from a fairly complex formula:

I will not include the formula, but basically what it does is a number of calculations including subtracting dates, that is

TODAY'S DATE - A GIVEN DATE (provided in a different cell)

That means that, either manually or automatically, those values are constantly recalculating (with every second that goes by, that value changes).

And the number of values/cells to update is not few: about 1100.

Here's the problem.

When I press SORT, Excel seems to be absolutely incapable of sorting that list correctly. The values are completely and randomly out of order.

I wonder if it could be due to the fact that given that those values would be constantly changing, there would be a conflict with the commands

sort
update

View 9 Replies View Related

Unable To Retrieve My Files

Nov 19, 2009

I recently formatted my laptop harddrive. I'm running windows XP Pro. I backed up all files to my 500GB WD external drive. All is fine except that I'm now unable to retrieve my excel files and no one has been able to really help. These spreadsheets are very important to me.

View 9 Replies View Related

Unable To Figure Out Sumproduct

Feb 18, 2010

I've been unable to figure this out for the past few hours so I figure I better turn to.

I need to sum all "orders.price" on sheet 1 when,

1. SaleDate is within the two reference dates(basically monthly)

2. location field in sheet 1 contains the particular string of text

Using the filter function, I've narrowed down that the results of these are not correct at all.

The actual sales are consistent through the months, so each month should have a number in it, yet the worksheet results in almost all of the fields equaling zero.

View 9 Replies View Related

Unable To Format Dates

May 25, 2009

I am trying to move the data from sheet1 column A to sheet2 column A while reformatting the data from its current format (dd/mm/yyyy) to format (mm/dd/yyyy). The data from sheet1 is provided to me by a client and is produced daily through their system which they have told me they cannot change the formatting on the reports. When i try to move data from sheet1 to sheet2 and reformat it only half the data formats into the correct date format. does anyone know how to get the data from sheet1 to format and move to sheet2 properly?

View 3 Replies View Related

Unable To Use '?' In Custom Filter

Apr 14, 2006

I have a column named remarks (amongst many others) and want to apply a custom filter on my data so that all records which have a "?" anywhere in the text should be listed.

However I can't do that because in the filter dialog box, the use of "*" and "?" is for wildcards...

View 9 Replies View Related

Unable To Paste Data

Jun 15, 2006

One of my workbooks contains 6 worksheets. Quite often I need to copy a row of data from sheet 5 to sheet 1. I right click, copy, select sheet 1, right click and find that the paste options are greyed out and so unavailable. If I wanted to, all the other sheets would allow me to paste the data into them but not sheet 1. It did work until recently so I suspect that it is something that I have inadvertantly done. I have checked things like security, protection and the like but find myself now going around in circles.

View 3 Replies View Related

Unable To Graph Excel Data?

Feb 9, 2014

I am trying to graph the amount of calls that come in on each day and at what hour. I am trying to put the days of the month along the x axis and hours along the y axis. I then want the number of calls to show as a scatter at certain times on each day. Is this possible? I have attached a sample of a table I will be working with that has made up data on it. I have tried using the select data function to try and change the axis, but I do not think I am writing the correct things in.

View 4 Replies View Related

Unable To Calculate TAT Between Multiple Days?

Feb 18, 2014

I want to calculate the TAT between multiple date: For example: I have a request I received on 1/2/2014 and I sent to Abhi on 1/2/2014(Same day) and I got a reply on 1/3/2014 from Abhi. I forwarded the same request on 1/3/2014 to Prasad and got a reply on 1/5/2014. And I closed the request on 1/5/2014. How do I calculate TAT on this ? I want the Tat to be shown as 3 days because I just took three days on the request to complete that is 1/2/2014, 1/3/2014 and 1/5/2014..

View 4 Replies View Related

Unable To Use Cell For Reference Which Has Formula?

May 4, 2014

I have one coloumnA with formula =IF(F4="","",(H4-F4)) ------ the result I want to use for reference in which I am unable to use the result value using below formula.
I have one more cell B with month & date

Currently using formula =SUMPRODUCT((TEXT(A4:A1501,"mmmyyyy")=$B4&$C4)*('Credit Cards&Loans Transactions'!J4:J1501))
Cell B4 has month & C4 has year.

J4:j1501 cell has the formula "=IF(F4="","",(H4-F4)) " , I want to use the result of cell in above formula.

View 3 Replies View Related

Unable To Delete Or Edit Comments

Feb 9, 2009

I have a comment which I wish to edit, but I am unable to either edit or delete the comment. I have checked the 'shared workbook', 'shared worksheet', and 'protected cell' options and they are all turned off (never had them on).

The cell I have the comment on has a dropdown box, but I can't see that being a problem. I am able to add a comment, which I can edit and delete, but the original comment seems to be 'stuck'.

View 3 Replies View Related

Unable To Open XLS File Without Password?

Feb 5, 2013

I have a certain .xls file which is password protected.

Now i have forgot the password for opening the file. Is there any other way of opening the file without password or using a Macro.

View 2 Replies View Related

Unable To Change Date Format?

Mar 7, 2013

I am not able to change date format. Like I need to convert it as yy/mm/dd format

View 14 Replies View Related

Unable To Merge Duplicate Data?

Mar 28, 2013

I was given 6 spreadsheets combined into one (the reason is immaterial-but valid) it is what it is... unfortunately! (42 columns, 14,000 rows of which 450 names are duplicated as illustrated below)

I want to merge duplicate data.. but not the way I see it shown in all the 'merge' and the 'delete duplicate' threads I have seen so far.

I manage a homeless shelter and someone duplicated the spreadsheets and started using the duplicates to enter fresh data.... several times!

As a result I now have somewhere around 8 instances, (or 7,5,3 etc) of every homeless guest, but it has duplicate data in some columns, and new data in others, for instance:

I want to turn this....
Name SS# 1st entry date, 2nd entry date, 3rd entry date, fourth entry date, etc...

John Smith, 123-45-6789, 1/5/2010, 7/13/2010, 3/30/2011, 5/16/2012
John Smith, 123-45-6789, 1/5/2010,
John Smith, 123-45-6789, 1/5/2010, 7/13/2010, 3/30/2011,

I tried de-duping based on duplicate rows and that worked with the pure duplicates get out of the mix, but if I try to to de-dup on only the first two columns of data it may remove date I want to keep.So I need to de-dupe and merge at the same time.

View 3 Replies View Related

Unable To Insert Columns Or Rows

Apr 7, 2013

I am unable to insert sheet rows or columns in a microsoft office spread sheet in a specific file. Other files are Ok.

View 14 Replies View Related







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