Free Microsoft Excel 2013 Quick Reference

Make whatever row my cursor is on highlight

I got a nice bit of code back in the old excel 2003 days about this but I lost it since i changed to 2007, here is the description:

On whatever row I select a cell, make that entire row highlighted with a color or somthing.

Just that simple. I want to click on a cell and make the entire row highlight automatically. If I click another cell, the highligh needs to follow. If I ress the down or up arrow, the highlight just follows theselected cell whereve it goes highlighting the entire row

thanks


I have checked everywhere and have been unable to locate an answer to this question. I want to be able to highlight the row that my cursor is currently in. For instance, if I am in cell G11, then I want row 11 to be highlighted. As I move to another cell, say F21, then I want the highlight to move with me so that row 21 is highlighted. Please help!!!

WHEN RUNNING A LARGE SPREAD SHEET I NEED TO IDENTIFIY THE LINE THE CUSOR IS
ON SO I CAN SEE THE DATA ON THE ACTIVE CURSOR LINE ONLY. TO HIGHLIGHT THE
ACTIVE LINE I CAN QUICKLY SEE THE DATA ON THAT LINE ONLY .
THE COLOR OF THE LINE WOULD CHANGE WITH THE ACTIVE LINE THE CURSOR
IS ON. THE COLUMN COLOR IS NOT WANTED

"If cursor is on A12:B32, then is OK to run macro. If outside that range, msgbox "Not gonna do it" and then exit sub."

What is the code for that?

Even when I lock cells, the user can still put a cursor on them. And then if you try to run macros around that (add a row, etc.) you get an error.

How do stop the macro from even trying to run unless the cursor is within a certain area (A12:B32, for instance)?

??

Thanks for the help!

Lost

How do I resolve this problem. My cursor is a black box. I have reinstalled
Office and ran detect and repair, plus Symantec windows repair to no avail.

Please help

my cursor is a cross and i cannot use it to drag formulas. please help.

Is there any way to hi lite the entire row the cursor is on? I have a wide
spread sheet and this would help user see other data in a row he is inputing
to.

If there is no excel setting for this, is there some simple vba code I could
trigger when the cursor moves?

On the attached example, I have a form control button on the worksheet that opens up a form. The first row of labels are fixed and will remain that way as headers but the second row of labels want their value to be the relevant value from the currently selected row on the worksheet. For example, if my cursor is on row 5 then the values want to be :

'3, 3/2/2012, Description 3, 1, , 103'

I would also like to then scroll through each row by using the spin button on the form (Previous to go up one row and Next to go down one row) and also use the ComboBox to be able to skip directly to a transaction.

This may seem like little pointless but this is simply an example to make it more straight forward to explain and then once I know what how to do this then I can go on to a more worthwhile form.

Many Thanks,
Adam.

I have a program that is mostly working but I have discovered, more or less
by trial and error that if my cursor is not on the row in which the program
will start adding data, then the conditional format formula my procedure
builds will use the incorrect row. I know that the variable I am using
represents the correct row for the CF as I have put a break point on that
line, but still the CF does not use the variables content unless I make sure
my cursor is on the row that the variable is equal to.
Here is the line where I have my breakpoint and below that is the complete
section where the problem is occurring. It doesn't seem like I should have
to have my cursor in any particular row, and if anyone else ever ends up
using this, I know that is going to be too hard to explain why they need to
do that.

..FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND($A" & lTrackStartRow & ",$C" & lTrackStartRow & ")"

Say I start out on row 7 and the procedure is bringing in 4 rows worth of
data from another spreadsheet. When I run this the first time,
ltrackstartrow = 7. CF that is created is perfect. I want to test it again,
so I run the macro again (when I first noticed the problem) without moving my
cursor. When I debug the program during the 2nd run, ltrackstartrow is 11
which is correct, but when I look at the CF, it is referencing row 15. While
experimenting, I had my cursor on, for instance row 4 before running it the
first time, and my CF was wrong. And finally, just a while ago, I ran the
procedure 3 times in a row, each time making sure my cursor was in the row
that would be the same as ltrackstartrow. Every time the CF that was built
was correct.

I hope someone can offer a solution so that the CF will be correctly built
regardless of where my cursor is when I run this. If you need to see the
entire procedure, let me know and I will post it.
Thanks.

With wsTracking
.Range(.Cells(lTrackStartRow, iTrackStartCol),
..Cells(lTrackFinalRow, 21)).Style = "MyInput"
With .Range(.Cells(lTrackStartRow, iTrackStartCol + 12), _
.Cells(lTrackFinalRow, iTrackStartCol + 15))
.FormulaR1C1 = "=if(weekday(rc[-1])>3,rc[-1]+5,rc[-1]+3)"
.Style = "MyFormula"
.NumberFormat = "m/d/yyyy"
End With
' The above takes care of everything except 2 columns within the
range that
' need a slightly different formula
With .Range(.Cells(lTrackStartRow, iTrackStartCol + 12), _
.Cells(lTrackFinalRow, iTrackStartCol + 12))
.FormulaR1C1 = "=if(weekday(rc[-1])=6,rc[-1]+3,rc[-1]+1)"
End With
With .Range(.Cells(lTrackStartRow, iTrackStartCol + 14), _
.Cells(lTrackFinalRow, iTrackStartCol + 14))
.FormulaR1C1 = "=if(weekday(rc[-1])=6,rc[-1]+3,rc[-1]+1)"
End With
With .Range(.Cells(lTrackStartRow, iTrackStartCol), _
.Cells(lTrackFinalRow, iTrackStartCol + 8))
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND($A" & lTrackStartRow & ",$C" & lTrackStartRow & ")"
.FormatConditions(1).Interior.ColorIndex = 46
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND($A" & lTrackStartRow & ",$B" & lTrackStartRow & ")"
.FormatConditions(2).Interior.ColorIndex = 6
End With
With .Range(.Cells(lTrackStartRow, iTrackStartCol + 12), _
.Cells(lTrackFinalRow, iTrackStartCol + 12))
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND($A" & lTrackStartRow & ",not($C" _
& lTrackStartRow & "),$b" & lTrackStartRow & ")"
.FormatConditions(1).Interior.ColorIndex = 6
End With
With .Range(.Cells(lTrackStartRow, iTrackStartCol + 14), _
.Cells(lTrackFinalRow, iTrackStartCol + 14))
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND($A" & lTrackStartRow & ",$C" & lTrackStartRow & ")"
.FormatConditions(1).Interior.ColorIndex = 46
End With
End With
--
Kevin Vaughn

I would like to highlight a row or column with my cursor and have it scroll
as I move my cursor so that I can see what items are in the same row/column
that my cursor is in.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc

Hello,

I'm working on a project, and have most of it working, but I'm stuck with this one function.

What I'm trying to do is have the user be able to select a cell in the spread sheet, and then when the Click the "Delete" button I created, the entire row in which the cursor is currently at should be deleted.

Thanks in advance for any replies

Hi,

I need you help to solve a poblem with my macro.

I would like to copy current row next to my active cell but only specific cells using Macro. I have a existing Macro as below which copies the current row and copies into next row.

Sub Macro1()
'make new row
ActiveCell.EntireRow.Insert Shift:=xlDown
'copy the row above
ActiveCell.Offset(1, 0).EntireRow.Copy Cells(ActiveCell.Row, 1)
End Sub

But I dont want to copy entire row..Only specific cells.

I have attached a example. In the attached example, I have data in 10 rows and 10 columns. When my cursor is on row 4(activecell) and I run the Macro it creates a new row next to row 4 and copies data from row 4. But I dont want to copy entire row. I want to copy only values in column A, Column D-G from the active cell row to next row. I would like to do this whenever the macro runs.

I appreciate your help.

Thanks in advance.

Senthil

Hello all,

I'm fairly familiar with Excel, but just starting to learn VBA. I have a little bit of experience messing around with VB, so hopefully, this will be fairly easy for me to pick up.

Anyway, I'm in the process of developing this spreadsheet solution for my work. What this spreadsheet does is tracks provide information to a team of people all over the world. we track certifications based on application, system, graphics card, OS, and driver.

So, the spreadsheet contains several rows with many columns. I created a userform that would add new rows with the above information. after awhile, this will become a pretty big spreadsheet with several hundred rows.

My question is, on my userform, when I select a criteria using the dropdown combo box (application, OS, graphics card, system) and then enter a driver version in the text box, could it do a search first to make sure I'm not duplicating a record. So, if I enter an application, OS, graphics, system that already is listed with a driver, I don't want to add it again unless I'm trying to update the driver information.

So when I click on Add, how do I make it search the existing rows to make sure that I'm not duplicating my efforts?

thanks,

Charles W.

Hello,

My cursor is in the form of a 3D cross - a cross filled in with white, as opposed to lines. It works for most functions but I must go to 'format' 'cells' 'border' to change or add borders - I am unable to use 'erase border' or 'draw border' in the toolbar. I'm not sure what I've done and have been unable to find any information by searching, but I'm hoping that someone will know how I can get out of this cursor 'mode'. Even some ideas on which words to use for a search would be helpful.
Many thanks,
francie

Within a normal excel worksheet (so not a pivottable): How can I test (w/in VBA) the current row that my cursor is on to see what level the outlining is?

Thanks for any help...

So, I'm a VBA newbie and I've scoured the forums and couldn't find anything which helped me to solve this problem. Hoping someone can help me out...

I've got a menu in which the user has a checkbox with 3 choices.

Choice 1 = Red
Choice 2 = Blue
Choice 3 = Green

My macro looks at what the user selected and then goes through a column on the spreadsheet - for example say the user only checked Green. In this case, a variable would be set to 001 (if they checked blue and green the variable would be 011...). The then macro goes through coulmn x and whenever there is a "Green" in column x, it selects the row, deletes it, and evaluates column x's next row.

My problem is, that I'm not deleting all of the rows with Green in column x. I've set breaks throughtout the code and the variables are all set correctly, I've checked for spaces before/after "Green" in the rows not being deleted, and nothing seems to work.

Here's my code:


	VB:
	
 = "001" 
    Do Until IsEmpty(ActiveCell.Value) 
        If ActiveCell.Value = "Green" Then 
            ActiveCell.EntireRow.Delete 
        End If 
        ActiveCell.Range("A1").offset(1, 0).Select 
    Loop 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
Anyone have any suggestions? Thanks!

I'm not sure what she did to her settings, but when she opens up any workbook, instead of being able to select a cell, the mouse highlights everything she scrolls across. She can't make any changes, or even click on her toolbar. It's only happening in Excel, so I thought one of you fine people could help me out!

Thanks so much!

So when I open Excel, all of the drop-down menus work fine until I click on a cell and then it gets stuck on highlighting cells and won't let me do anything else, including exiting the program. It moves around when you try to click on other stuff and hilights tons of cells, but that is the only thing it will do. Anyone know what's going on?

Hi,
I am a newbie try my hands at macros, I am working on a project where after each row of data is entered, it need to be printed out right away, then you enter another row of data, the second row gets printed out, and so on... I would like to build a macro to print the record for whichever row the cursor is on later on.

Here is what I have using macro recorder.

Product Group Sales
1 a 50
2 b 60
3 a 75

Macro1 Macro
' Macro recorded 4/18/2008 by Preferred Customer
'
' Keyboard Shortcut: Ctrl+i
'
Range("C2").Select
Selection.Copy
Range("A9").Select
ActiveSheet.Paste
Range("A2").Select
Application.CutCopyMode = False
Selection.Copy
Range("B9").Select
ActiveSheet.Paste
Range("B2").Select
Application.CutCopyMode = False
Selection.Copy
Range("C9").Select
ActiveSheet.Paste
Rows("9:9").Select
Application.CutCopyMode = False
Selection.PrintOut Copies:=1, Collate:=True
End Sub

How do I record a macro to handle each new row of data instead of writing 300 macros. Righ now my macro will only handle the 1st row of data? Is there a way to treat all the new rows of data as one row that keeps updating? Maybe something about the way I reference the cell so it will keep updating?

Thank you so much for your help.

I have a huge sheet where one row represents one record (Different columns having different values).
e.g.

row-1 A B C D
row-2 E F G H
row-3 P Q R S

so on ..........

what i want is,

If my cursor is on row-1, then only that row should be displayed. i can change colur of other two rows to white so that those will be invisible.
Once i move to row-2, row-2 should be displayed and other 2 should turn white ..... so on !!

Think this would be possible using "Conditional Formatting" if i can check the cursor potion.
i will apply the rule to all the cell like

If Cell-row = Corsor-row then font color = Black
Else font color = white

Is that possible by any chance .............

don't want to go for macro !!!!!

Thanks,
hsk

One of my cols. on my worksheet stores diff. currency type i.e Euro, GBP,USD, etc..

Is there a way to 'copy' the corresponding Curr. type onto a CELL when the cursor moves up & down the ROWs ?

In short, let's say my cursor is on ROW1 & Curr. type for that ROW is USD :
CELL VAL. = 'USD'

If Curr. type = 'GBP for ROW4 (where my cursor is positioned), then
CELL VAL. = 'GBP'

DC

When I select multiple cells in a spreadsheet that are not adjacent to each
other, I can't see what cells are being highlighted unless I go through the
extra step of changing the cell colors. Sometimes, I want to quickly add up
multiple cells by simply highlighting them. I can't do that unless I change
the color or write in a sum function. For example, if I click on cells A1
and C10 and d25 to add them up, I can only see that my cursor is on the last
clicked cell, so I can't tell if I've highlighted all three cells. It's
driving me crazy and slowing me down. Any thoughts?

How do I create a macro which will allow me to insert a row on top. Eg
I have data in C3..H10. Row C11..H11 is blank but cells are formatted
(general, currency etc.). I have a macro button on B11, with the
following procedure attached to the button;

Sub InsertLineAbove()
ActiveCell.Offset(0,0).Range("A1").Select
Selection.EntireRow.Insert
ActiveCell.Offset(1,0).Range("A1").Select
End Sub

The probelm is when my cursor is on B11 or C11, it works beautifully,
but if the cursor is anywhere else and I click on the button (located
at B11) then it insert a line at the point where the cursor was. Which
is exactly what I don't want.

Thanks
Kieranz

PS Admin, suggestion to help newbies - is it possible to have a guide
in pdf which can be downloaded to read at leisure on using the forum
etc.

--
Kieranz
------------------------------------------------------------------------
Kieranz's Profile: http://www.excelforum.com/member.php...o&userid=27663
View this thread: http://www.excelforum.com/showthread...hreadid=471787

I am trying to do four things via a marco:
1) Open a time report based on a file path AND a file name contained in a
cell in the row my cursor is in
2) Copy and "paste special-values" from the time report into the master
workbook starting at column A of the current row the cursor is in
3) Close the time report without getting a "do you want to save this
message" and a "do you want to have the data you copied available for pasting
message"
4) move down to the next available row, input the time report employee name
and pay period I wish to call up and repeat steps 1 through 3 for the next
time report

Here is an example of my data:
Sample Time Report records (data I want to copy):
(File Name of this example is Dena_1_31_2005.xls and stored under CataJan
both file name and path are created from concatenations of data in the time
report)
Name PayPeriod Hours Client
Dena 1/31/2005 30 ABC Customer
Dena 1/31/2005 20 Togos
Dena 1/31/2005 15 Kaplan

Example 2 - time report feb file for another employee (more date I want to
copy in per step 4 above) File Name = Joe_2_28_2005.xls and path =
C:DataFeb

col A col B col c col d
Name PayPeriod Hours Client
Joe 2/28/2005 55 marriot
Joe 2/28/2005 25 fairfield
Joe 2/28/2005 11 hamburger

Naturally I have time reports for multiple people and for multiple pay
periods. There are 45 line items of time to copy in from each time report.
I have 20 employees and have designed a template where on every 45th row I
have inputted the employee name in column A. Column B on every 45th line of
my template I have set equal to B1, which I have set to the pay period I wish
to copy in. Imagine the following:

cell A1= Dena
cell B1= 1/31/2005
cell A46 = Joe
cell B46 = 1/31/2005
etc, etc. for 18 other employees.

Column C is blank and a placeholder for the data to copy in (hours) and
column D is similarly blank and a placeholder to copy in the client. I then
created a formula in column E which mirrors the exact file name where you
could pull the data to populate all the rows and column C &D from. The
problem I am running into is how to avoid calling a particular row. The file
name to open and copy from is always in column E and also how do I avoid
hardcoding the path of where to find it since the path is dictated by the pay
period date (column B). (I need it to go open the file in the relevant month
folder)

I have been able to write a macro that will open a file with the name of the
active cell you are clicked on when you run the macro. The macro opens the
time report with that file name, copies the 45 rows from the data_export
worksheet, paste special values them in starting at a hard-coded cell
referemce. A1. I can't figure out how to say, starting in the current row,
go to column E, open a file with the name contained in column E of the
current row, copy the data, go to column A of the current row and
paste-special the data, now scroll down 45 lines and then I can run the macro
again for the new name / date.

This is the macro I have so far that is stuck on certain cell reference
(current cell is file name to open) rather than go to column E generically,
and paste to cell is A1, rather than generic column A. ANY HELP WOULD BE
HUGELY APPRECIATED.
I'm happy to email you the two files if it'll make more sense....

Sub Import_Time_Report_Data()
'
' Macro recorded 12/15/2005 by
'
StrFileName = ActiveCell

Workbooks.Open Filename:="P:TIMESHEET2006" & StrFileName
Sheets("Data_Export").Select
Range("A2:L46").Select
ActiveWindow.LargeScroll Down:=-1
Range("A164").Select
ActiveWindow.SmallScroll Down:=-192
Range("A2:L46").Select
Selection.Copy
ActiveWindow.Close
Range("A1").Select
ActiveSheet.PasteSpecial Format:="Text", Link:=False, DisplayAsIcon:= _
False
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
ActiveWindow.SmallScroll Down:=27
Range("A51").Select
End Sub

I am trying to do four things via a marco:
1) Open a time report based on a file path AND a file name contained in a
cell in the row my cursor is in
2) Copy and "paste special-values" from the time report into the master
workbook starting at column A of the current row the cursor is in
3) Close the time report without getting a "do you want to save this
message" and a "do you want to have the data you copied available for pasting
message"
4) move down to the next available row, input the time report employee name
and pay period I wish to call up and repeat steps 1 through 3 for the next
time report

Here is an example of my data:
Sample Time Report records (data I want to copy):
(File Name of this example is Dena_1_31_2005.xls and stored under C:DataJan
both file name and path are created from concatenations of data in the time
report)
Name PayPeriod Hours Client
Dena 1/31/2005 30 ABC Customer
Dena 1/31/2005 20 Togos
Dena 1/31/2005 15 Kaplan

Example 2 - time report feb file for another employee (more date I want to
copy in per step 4 above) File Name = Joe_2_28_2005.xls and path =
C:DataFeb

col A col B col c col d
Name PayPeriod Hours Client
Joe 2/28/2005 55 marriot
Joe 2/28/2005 25 fairfield
Joe 2/28/2005 11 hamburger

Naturally I have time reports for multiple people and for multiple pay
periods. There are 45 line items of time to copy in from each time report.
I have 20 employees and have designed a template where on every 45th row I
have inputted the employee name in column A. Column B on every 45th line of
my template I have set equal to B1, which I have set to the pay period I wish
to copy in. Imagine the following:

cell A1= Dena
cell B1= 1/31/2005
cell A46 = Joe
cell B46 = 1/31/2005
etc, etc. for 18 other employees.

Column C is blank and a placeholder for the data to copy in (hours) and
column D is similarly blank and a placeholder to copy in the client. I then
created a formula in column E which mirrors the exact file name where you
could pull the data to populate all the rows and column C &D from. The
problem I am running into is how to avoid calling a particular row. The file
name to open and copy from is always in column E and also how do I avoid
hardcoding the path of where to find it since the path is dictated by the pay
period date (column B). (I need it to go open the file in the relevant month
folder)

I have been able to write a macro that will open a file with the name of the
active cell you are clicked on when you run the macro. The macro opens the
time report with that file name, copies the 45 rows from the data_export
worksheet, paste special values them in starting at a hard-coded cell
referemce. A1. I can't figure out how to say, starting in the current row,
go to column E, open a file with the name contained in column E of the
current row, copy the data, go to column A of the current row and
paste-special the data, now scroll down 45 lines and then I can run the macro
again for the new name / date.

This is the macro I have so far that is stuck on certain cell reference
(current cell is file name to open) rather than go to column E generically,
and paste to cell is A1, rather than generic column A. ANY HELP WOULD BE
HUGELY APPRECIATED.
I'm happy to email you the two files if it'll make more sense....

Sub Import_Time_Report_Data()
'
' Macro recorded 12/15/2005 by
'
StrFileName = ActiveCell

Workbooks.Open Filename:="P:TIMESHEET2006" & StrFileName
Sheets("Data_Export").Select
Range("A2:L46").Select
ActiveWindow.LargeScroll Down:=-1
Range("A164").Select
ActiveWindow.SmallScroll Down:=-192
Range("A2:L46").Select
Selection.Copy
ActiveWindow.Close
Range("A1").Select
ActiveSheet.PasteSpecial Format:="Text", Link:=False, DisplayAsIcon:= _
False
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
ActiveWindow.SmallScroll Down:=27
Range("A51").Select
End Sub