Over 1 million tech questions and answers.

Solved: Clearing Cell Contents Based off other Cell

Q: Solved: Clearing Cell Contents Based off other Cell

Hello,

I am attempting to clear 2 cells, based off the value of another. I am pretty sure the code is correct, because it works within another Macro. Thanks.
Code:
Sub REMOVE()


Dim p As Long
p = Cells(Rows.Count, "a").End(xlUp).Row


For i = 1 To p
Range("k2").Select
If InStr(1, Range("k" & p), "None") > 0 Then Range("L" & p) = "" And Range("M" & p) = ""
'If no Issue, Location/Obsevations should be blank
Next i


End Sub

RELEVANCY SCORE 200
Preferred Solution: Solved: Clearing Cell Contents Based off other Cell

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)

A: Solved: Clearing Cell Contents Based off other Cell

hi
try this variation;
Sub REMOVE()

Dim p As Long
p = Cells(Rows.Count, "a").End(xlUp).Row

For i = 1 To p
If InStr(1, Range("k" & i), "None") > 0 Then
Range("L" & i) = ""
Range("M" & i) = ""
End If
'If no Issue, Location/Obsevations should be blank
Next i

End Sub

Read other 2 answers
RELEVANCY SCORE 120.8

Using Excel 2003 in Windows XP

I would like to use the contents of one cell as the destination location for copying data.
For example
I have 2 worksheets 1) Results and 2) info
in info
A1 = 'ABC'
C1 = 'Results!O54' < this is calculated based on other data in sheet.

Using a macro, I'd like to copy contents of A1 to cell location 'Results!O54' more specifically to where ever C1 points... C1 will change based on other data in info sheet.

The macro record for action looks like this (but I would like the 'O54' to be based on contents of C1 which changes)
Range("A1").Select
Selection.Copy
Sheets("Results").Select
Range("O54").Select
ActiveSheet.Paste
Sheets("info").Select

There is more to it then that but I think this is where I am stumped.
 

A:Solved: Excel: Uses contents of Cell to select a cell

Sheets("info").Range("A1").Copy Destination:=Sheets("Results").Range(Sheets("info").Range("C1").Value)
 

Read other 3 answers
RELEVANCY SCORE 114.8

Hi Guys,

Apologies for repeating an old question, but I am trying to build my spreadsheet so that it auto-hides any rows were there is zero premium outstanding for a client.

I had gone through previous answers, and I had tried to lift and amend some VBA code to achieve this. However, somewhere within this code or the way I've implemented it, there is an error, because it's not showing of hiding any rows.

Can you please take a look at the attached and fix it (in order to hide all rows with a zero in column C), and maybe point out what I was doing wrong or omitting. I have anonymised my data.

Many Thanks
John
 

A:Show/Hide columns based on cell contents

Apologies... the criteria column is actually F, not C, the "outstanding premium" column. The intention being to display only those rows where client still owe premium
 

Read other 1 answers
RELEVANCY SCORE 114.8

Hi All,

I need to make a macro that will add borders to certain cells.
I have a generated report from another product so I don't know how many rows there will be until the report is generated. The number of rows is specified inside the report, so I do have access to it. It is stored in cell C5.

So what I want to do is add borders around C5 number of rows starting at A7..E7

I tried using a rule, to just put borders around cells that contain data, but that won't work because sometimes cells are blank and I still want the border around them.

Help?! Please

Thanks a bunch!!!
Lori
 

A:Excel Macro to add borders based on cell contents?

Hi Lori

Here is a macro that will take the value in C5 e.g. 10 and then apply borders to all cells in A7 to E16
Code:
Sub add_borders()
lRow = Range("C5") + 6
Range("A7:E" & lRow).Select
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlC9ontinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
End Sub
 

Read other 1 answers
RELEVANCY SCORE 113.2

I'm attempting to write my first macro for an Excel 2003 workbook. I'm not completely code illiterate (I've got moderate skills with AutoLISP), but I'm new to VBA and am not yet an Excel power user, so please be gentle.

The macro I want to write will:
check that the selected cell's content is underlined before proceeding
copy the content of the currently selected cell into an external plain text .log file
.log file lines should be: year/month/day - time - username - cell contents
.log file names will probably need to be generated
clear the cell's content and formatting (particularly underline and text/background color)
Here's what I have so far:
Code:
Sub Unpost()
If Selection.Font.Underline = True
Then Selection.ClearFormats And Selection.Clearcontents
Else
If MsgBox("The selected cell is not underlined...are you sure?", vbOkCancel) = vbOk
Then Selection.ClearFormats And Selection.Clearcontents
Else Exit Sub
End If
End If
End Sub
If I've written it correctly, it should currently do everything except log the cell contents. This, from what I've seen, is going to be the trickier part. I intend to use this macro 50+ times per weekday, so at some point the .log files will get too long to be useful, so I assume it will need to automatically create new logs (perhaps "year-month.log"). I've seen some useful info about appending to an external log here and here, ... Read more

A:Excel 2003 macro: log contents of selected cell, clear cell

You need to use the "File Scripting Object" to create and/or append text to a file. I've included a link below to get you started. If you are unable to figure it out on your own let me know and I'll write the code for you.

http://www.virtualsplat.com/tips/visual-basic-fso.asp

Rollin
 

Read other 1 answers
RELEVANCY SCORE 111.2

I have built a simple timesheet for someone in my dept, which includes amongst other things:

- hours worked over a month,
- how many hours owed/extra worked
- a cumulative of this figure over the months.

The requestor wants to be able to type a letter such as 'e' to represent a 07:30hr shift. So they type 'e' and the cell contents change to 07:30. There are about 6 different codes.

Normally a Vlookup would work EXCEPT you can't change the contents of the cell your are working upon.....cicrular referencing!

I could see two ways forward: either a function that allows the above

OR (perhaps more favourably)

leaving the lookups until the hour calculations at the base of the form. i.e Instead of a simple Sum for the hours worked that month, it could read the values in the range, look them up from a table(vlookup), and then sum the looked up figures to give the answer in the 'hours worked' cell.

I vaguely remember this being possible from my university days but can't remember how.

Can anyone help me?
 

A:Excel 2003: automatically changing a cell's contents based on keyword entered

Read other 9 answers
RELEVANCY SCORE 111.2

I have a sheet set up with the list with the description (text) in column B, and summary scores (numerical, percentage) in column D. I want to do a summary row at the top of the sheet that pulls the data from the B cells, based on the lowest 3 values in column D.
 
I plan on using the formula =SMALL(D7:D32,1) (with d7:d32 being the list of percentages), to figure out the lowest 3 values. But the formula just pulls the summary score, not the description. I want to pull the description into but I am at a loss.
 
I am using excel 2013 on windows 10. Any help would be appreciated.

Read other answers
RELEVANCY SCORE 111.2

I have a sheet set up with the list with the description (text) in column B, and summary scores (numerical, percentage) in column D. I want to do a summary row at the top of the sheet that pulls the data from the B cells, based on the lowest 3 values in column D.
 
I plan on using the formula =SMALL(D7:D32,1) (with d7:d32 being the list of percentages), to figure out the lowest 3 values. But the formula just pulls the summary score, not the description. I want to pull the description into but I am at a loss.
 
I am using excel 2013 on windows 10. Any help would be appreciated.

Read other answers
RELEVANCY SCORE 111.2

Hello,

I cant seem work out a solution for what I'm trying to do. I have an Excel workbook that has multiple sheets. On sheet 1 i want the data from cell "G3" to be copied onto sheet 2. But i want the location on sheet 2 to be based on whatever was entered into cell "D3" on sheet 1.

For example: Sheet 1, cell D3 I have the name John, in cell G3 i have 68. I want "68" to be pasted in sheet 2 in cell B26.

But if the name in Sheet 1 cell D3 is Suzie, then I want G3 to be pasted in Sheet 2 in cell D26. So I would need to identify the paste location for each person.

I want the data to paste to the next cell so that the next entry can be pasted below the last entry for that person (for John the first entry would go into cell B26, then the next entry would go into cell B27 and so on).

But i want it to be a specific range, i dont want data to be pasted past 20 cells (cell B45). If possible a message box could be created to let the user know that the max is reached.

I would appreciate anyone's help with this as i have been struggling for awhile to try to get this. Thank you
 

A:Excel - Copy paste cell into range based on another cell

Read other 12 answers
RELEVANCY SCORE 110

In cell j, I have formula =IF(SUMPRODUCT(ISNUMBER(SEARCH("VLXP",K2:AB2))+0)>=1,"Yes","No") that returns yes or no if VLXP is contained in any cell K2 through AB2 and it works correctly. What I would really like to do is then put into cell j the entire matching cell content or if not found return n/a. Is there a way to accomplish this maybe with VBA?
 

A:Solved: Excel if cell contains vlxp then put matching cell data in current cell

Read other 6 answers
RELEVANCY SCORE 106.4

hi, i have 2-excel cells in the same sheet, both contain manually entered numbers; cell-2 changes frequently; if the existing entry in cell-1 is < than the new entry in cell-2, cell-1 should immediately reflect this new value. how do you create this formula?
 

A:Solved: excel-replace content of cell-1 if cell-2 is > cell-1

Read other 8 answers
RELEVANCY SCORE 98

I would like to have some code whereby when the workbook is saved, it will check certain cells for their content. If the content meets the criteria, the workbook will save. If not, a message box will appear. Its like using the validation function, but only when the workbook is saved. For example – if cell A1 has an entry, then cell B1 must also have an entry otherwise it won’t allow saving. Any ideas?
 

A:Solved: Check cell contents at Save

Read other 16 answers
RELEVANCY SCORE 96.8

I have an excel sheet which has some data sorted in 5 columns (A,B,C,D,E)

Column D contains a machine name: either COLDTEST1 or COLDTEST2
Column E contains a number

What I want to do is to select the numbers in column E according to the machine name in column D.
So i basically need a command that looks for all the cells in column D that are called COLDTEST1 and select all there corresponding numbers in the cells in column E.

Could someone help me with this please?

I am thinking I would probably need a Do While or a For loop, but since i have limited knowledge in VBA I could not figure it out.

Thank you
 

A:Solved: Do While/For Loop to find specific cell contents

Read other 13 answers
RELEVANCY SCORE 96.8

How do I disable the "do you want to replace the contents of the destination cell?" alert. I went to Tools:Options:Edit and unchecked the alert before overwriting cells box. What else can I do?
 

A:Solved: Disable replace cell contents warning

budward said:

How do I disable the "do you want to replace the contents of the destination cell?" alert. I went to Tools:Options:Edit and unchecked the alert before overwriting cells box. What else can I do?Click to expand...

I found this on another forum and it worked for me!
Sub MyMacro()
Application.DisplayAlerts = False
'your code here
Application.DisplayAlerts = True
End Sub
 

Read other 1 answers
RELEVANCY SCORE 96

Hey all:

I'm have really no experience with coding, so I'm out of my depth trying to do this myself. Hopefully someone can help, so here goes!

Essentially, my excel sheet keeps track of dates of when files need to be renewed. They need to be renewed every 60 days. So I have an "IF" formula that tells me if it's time for renewal.

What do I need to do to get an email notification whenever a file comes up for renewal? I've attached a sample sheet.

Best,
Nick

PS.
Using Excel/Outlook 2010
ClickYes Pro is installed (don't know if it will be necessary or not)
 

A:Solved: Emailing from Excel Based off Cell Value

Read other 16 answers
RELEVANCY SCORE 96

Does anyone know a way to manipulate the countif formula to count how many cells are "green" or "red" (with varying text in each cell), rather than the value of the cells?

Can this be done in VB?
 

A:Solved: countif based on cell format, not value?

Read other 10 answers
RELEVANCY SCORE 96

Hi guys,

Can you please help me further expand the macro below? I need it to also look between the ranges of C24 and Z24 and hide the respective column. (i.e need some sort of loop)

i.e

if C24 is 0, then hide column C
if D24 is 0, then hide column D
etc...
Sub Hide_Column ()

If Range("H24").Value = 0 Then
Columns("H").EntireColumn.Hidden = True
Else
Columns("H").EntireColumn.Hidden = False
End If

End Sub
 

A:Solved: Hide Columns based on value of cell

Read other 9 answers
RELEVANCY SCORE 96

Hello,

Can you please kindly help me to solve the below interesting issue? (I will make my best to make myself understood, which is sometimes very difficult)

I need to see DIRECTLY in Windows Explorer (I use Win Xp) what is contained in the cell A1 on Worksheet1 of an Exel file (most often, the contents of the cell is a date in special Excel date format = yyyy-mm-dd, but sometimes the contents is a text). The purpose of all this is to sort Excel files (according to the contents A1 of the particular file) directly in Windows Explorer without the need for opening the files.

I hope that this could be realizable by transferring the contents of the cell into one of the standard Excel file properties that can be seen in )Windows Explorer) Details View (eg. Description, Subject or any other property) every time on saving the Excel file.

In addition:
- If the contents of the cell is "preserve", the Excel file property should be left as it was before I opened the file.
- If the contents of the cell is "delete", the Excel file property should be (strange to read)deleted.
-----------
EXAMPLE:
On saving the Exel file, whose cell A1 in Worksheet1 contains „2012-01-05“, this date should go into the Excel file property Description.
- However, if the contents of the cell is „shall be done later“ then „shall be done later“ should go into the property. If the contents is „preserve“, the property should be left as is. If the contents is „delete“, the property... Read more

A:Solved: Transfer of cell contents into an Excel file property

You marked this as solved so does that mean you got this sorted? If so could you post your solution so others may benefit from it?

Rollin
 

Read other 3 answers
RELEVANCY SCORE 96

Excel Marco Dropdown Menu Cell Contents I have an excel workbook with a "INPUT" WkSht, and a "ACTIVE" WkSht.
INPUT has a dropdown menu that looks up a list in ACTIVE, locates a desired value, and displays several cells contents in ACTIVE, - in the INPUT page.
This is working.

Question 1:
One cell in ACTIVE contains "comments" - how do I display the comments in the cell from ACTIVE, in a cell in INPUT - so I can look at all of them.

Question 2:
How do I update the contents of a cell in ACTIVE, at the same location that was selected from the dropdown.

I am a beginner - please help.

See present MACRO below...

Sub UpdateLogWorksheet()

Dim historyWks As Worksheet
Dim inputWks As Worksheet

Dim nextRow As Long
Dim oCol As Long

Dim myRng As Range
Dim myCopy As String
Dim myCopy2 As String
Dim myCell As Range

'cells to copy from Input sheet - some contain formulas
myCopy = "D5,D6,I18,D20,D19,D8,D10"
myCopy2 = "D5,D6,D7,D8,D9,D10"
Set inputWks = Worksheets("Input")
Set historyWks = Worksheets("Payments")

With historyWks
nextRow = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0).Row
End With

With inputWks
Set myRng = .Range(myCopy)

If Application.CountA(myRng) <> myRng.Cells.Count Then
MsgBox "Please fill in all the cells!"
Exit Sub
End If
End With

With historyWks
With .Cells(nextRow, "A")
.Value = Now
.NumberFormat = "mm/dd/yy"
End With
.Cells(nextRow, &q... Read more

A:Solved: Excel Macro Dropdown Menu Cell Contents

Read other 16 answers
RELEVANCY SCORE 95.2

I'm working on a spreadsheet at the moment which displays a range of cells all containing values referenced from another spreadsheet (within the same workbook). This system works fine.

Every day, the original worksheet is updated. So, it has fields already arranged up until the end of the year. A row for every date. Now, needless to say, rows for dates in the future contain no values, and so when the spreadsheet I am working on now references those cells, it displays "$0.00" (which is correct, given I am dealing with financial figures).

Now, all of that works as expected, however, on the spreadsheet I am working on, all of those figures are displayed in a line graph. This line graph, at todays date, shows an enormous drop given that the fields for the rest of the year all show a zero balance.

What I need to do, is to get the remainder of those fields (every field that says "$0.00") to not display anything at all. So, if the value is $0.00, it would not display a value at all, and therefore not show anything on the graph.

Can someone tell me how I can achieve this? I'm sure it can be done with an "if" statement, but I'm not sure how to structure it.

Any help would be greatly appreciated.
 

A:Solved: Remove Cell Value If Cell Value Is Zero (Microsoft Office Excel 2007)

=If(a1="","",Sheet1!a1) and drag it down.

Where a1 is the first cell in spreadsheet you are working on, and sheet1!a1 is the sheet within workbook containing figure.

Not sure if the graph will recognize the "blank' cell as blank or "0"
You could try that

Pedro
 

Read other 3 answers
RELEVANCY SCORE 94.8

I need to provide seqential row numbers from 1 to N that relate to cells in another column when the cell value is greater than zero. For instance, if the column with data is column d and I have data greater than zero in cells d3, d4, d5, and d7 I'd like the row count in column c to read number 1 for c3, 2 for c4, 3 for c5, and 4 four c7. Cells c1 through c3 as well as c6 should remain blank. What formula do I use?
 

A:Solved: sequential row numbering based on value in another column/cell

Read other 7 answers
RELEVANCY SCORE 94.8

I know that this is probably a pretty trivial problem, but I can't seem to come up with the answer. I am trying to set the selection focus to a cell in a column, based on an offset variable. The following is a little macro that I created to experiment with. As written, it positions the selection focus on cell C6. But I can't find the way to set it to C6 + Offset. The only reason for the MsgBox statement is to prove that I passed the argument as expected.

Sub MvTo(ByVal Offset As Long)

Range("C6").Select
MsgBox "Offset " & Offset

End Sub

I thought I could use RnCn cell references and write something like Range("R6[+Offset]C3").Select, but I get an error return, so I'm missing something somewhere. Run-time error '1004', Method 'Range' of object "_Global' failed.

I am using Excel 2000.
 

A:Solved: Set cell selection based on a variable offset?

Read other 6 answers
RELEVANCY SCORE 94.8

Lets say I had in cell $A$1 the number "36", in row2 figures for monthly spend, in row 3 cumulative spend and in row 4 the month number(1,2,3,4..). What I want to do is substract the monthly spend from $A$1 months ago from my cululative figure in row 3 so I have a rolling cummulative hardware spend value of 36 months in this case. So in this case if I was to do it manually in cell AK3 I would have "=AJ3+AK2-A2" and drag it further right. So I add my monthly figure of spend each month to the cummulative figure in row three but also deduct the monthly spend from 3 years prior.

So in order to use the figure in $A$1 I could do something in row 3 like: starting from B3: "=if(B4>$A$1,A3+B2-[$A$1rows_further_back_thanB2],A3+B2). So when I get to month 37 in row 4 I deduct the figure in row 2 (in the formula in row 3 - the cummulative row) from 36 months prior. I hope this all makes sense. Can you help me please (see attached spreadsheet).
 

Read other answers
RELEVANCY SCORE 94.8

sorry about that title, not sure how else to summarize it...

here's what I'm looking for - if it's even possible?

if I have a formula in a cell - IF(A1:A20>0,1,0)
how do I get the value that's greater than 0, rather than a 1 for true? in other words, I don't want a 1, I want the actual number/value (from a1-a20) that made the IF true?

thanks!
Ron
 

A:Solved: excel - how to retrieve contents of a cell found in a range in a formula

Read other 8 answers
RELEVANCY SCORE 94.8

Excel question:

Testing - I have a column of numbers where I do a countif (A10:A365,A1)
In this case A1 = "1" and the column contains various number from 1-10.
I want to count the number of times 1 appears in the column up to row 100

I want to substitute "A365" with a value from cell "A2" ie, A2 = 100 and make it A100
So I'd like the countif logic to be countif(A10:A100, A1)

Then if I change A2 to 150 I get the range from A10:A150.

My issue is this range is used in a number of different caluclations and I'd like to dynamically change the rows to search.

Any help/direction appreciated.
 

A:Solved: Excel - reference a value (contents of cell) for use in dynamic part of range

Try this in place of your original COUNTIF:

=COUNTIF(INDIRECT("A10:A"&A2),A1)

(the section "A10:A"&A2 builds a literal string that "responds to" A2 value ; then you just throw in INDIRECT to make it work "for real")

Rgds,
Andy

EDIT: you may prefer a different approach:

=COUNTIF(var_Range,A1)

, where the defined name var_Range refers to:

=OFFSET(Sheet1!$A$10,0,0,Sheet1!$A$2-9,1)

You can test the dynamic range "effect" by entering 12 in A2, pressing F5, typing var_Range and pressing Enter. Then repeat with 15 in A2. Etc., etc.
 

Read other 3 answers
RELEVANCY SCORE 94.8

I'm running a spreadsheet for yearly budget using EXCEL 2010. Everything has run smoothly until today. If I enter values on one sheet, it shows up on all sheets. I've gone through the settings for EXCEL but cannot find a setting to change this. Anyone have a suggestion on how to correct this?

Tech Support Guy System Info Utility version 1.0.0.1
OS Version: Microsoft Windows 7 Professional , Service Pack 1, 64 bit
Processor: Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz, Intel64 Family 6 Model 30 Stepping 5
Processor Count: 8
RAM: 8183 Mb
Graphics Card: ATI Radeon HD 4600 Series, 512 Mb
Hard Drives: C: Total - 76216 MB, Free - 8485 MB; D: Total - 1907599 MB, Free - 1891982 MB; E: Total - 476809 MB, Free - 409377 MB; G: Total - 2861575 MB, Free - 2680780 MB; J: Total - 238472 MB, Free - 107677 MB;
Motherboard: ASUSTeK Computer INC., P7P55D-E PRO, Rev 1.xx, 103822980000259
Antivirus: ESET NOD32 Antivirus 4.2, Updated and Enabled
 

Read other answers
RELEVANCY SCORE 94

I have an excel sheet with two tables for customers to know which products the customer is using based on a Contract table.

The enclose sheet has two tables:
1. Customer
2. Contracts

All what I need is to fill the columns of "Product A", "Product B" and "Product C" of every customer looking at the table "Contracts" where the data is available based on the "Customer ID"

How can I do it?
 

A:Solved: MS Excel / Filling a cell with YES based on data from another sheet

I would just use a simple countifs formula to check if the customer ID and Product type match (ie the count of matches is greater than zero)
See attached.
 

Read other 3 answers
RELEVANCY SCORE 94

i have a spreadsheet that updates with data from a number of different sources. i need to filter only the relevant data that i need. i'm almost there but need to find out how to pull 2 more pieces.

in the attached spreadsheet the cells i need are in column R and T. I need to know the corresponding "name" and "size" of the data that is in column S.

unfortnuately the actual values don't show up in the spreadsheet b/c they are live data feeds but the formulas written up until now are still there.

in a nutshell what i'm doing is getting 5 price feeds and i need to filter out which is the highest updated within the last 2 minutes. i actually have the only the price figured out in column S, but i also now which name and how big the size is related to that price.

your help is very appreciated.

regards,
 

A:Solved: excel - data returned based on the value of a specific cell

Read other 10 answers
RELEVANCY SCORE 94

I selected a cell, and then recorded a macro when I copied the cell, moved down to the cell below it and pasted it. But when I select another cell, and then run the macro, it goes to the initial cells I did when I recorded the macro.

So is there a macro where I have selected a cell, whatever cell I decide, and then run the macro, and it copies the cell selected and paste it to the cell below the cell that was copied?
 

A:Solved: Macro to Copy and Paste From One Cell to Cell Below

Read other 16 answers
RELEVANCY SCORE 92.8

I need a code that will allow the workbook to be emailed when Column A is populated by certian numbers. The numbers in column A corespond to particular email addreses. This is the code I've been working but it isn't functional.

Sub Email_Out()
If Worksheets("Sheet1").Range("A5:A200") = "190030001" Then
ActiveWorkbook.SendMail Recipients:=("[email protected]")
ElseIf Worksheets("Sheet1").Range("A5:A200") = "190450025" Then
ActiveWorkbook.SendMail Recipients:=("[email protected]")
End If
End Sub

All help is greatly appreciated!
Mikey
 

A:Solved: VBA email excel workbook based on cell values using; If Then ElseIf Please he

Read other 16 answers
RELEVANCY SCORE 89.6

If in cell A1, the user was able to write a cell number of their choice, say B5.
In the cells that they would be choosing, would be numbers. In cell A2, I want to use the contents of the cell that the user has typed into A1. Not the contents of A1, but the contents of the cell that has its cell number in A1. In this case, I would want to use the contents of B5. There will be around 15 boxes in which the user is free to write any cell number they choose. Then, in the formula box (A2) I would read the contents of these cells, and if something was there get its contents and then use the cell number that it says in a sum, in which the numbers in all of the cells which the user has chosen were added up.
What could I do?
 

A:Excel 97 Cell Contents

Read other 9 answers
RELEVANCY SCORE 88.4

Hi,
I have a cell that contains 1st and last names seperated by a "space". I want to seperate them (1st and last) into 2 seperate cells.

Example:
Cell A1 contents = John Smith
After seperation
Cell A1 = John SMith
Cell B1 = John
Cell C1 = Smith

Your help would be greatly appreciated! Even if it's just pointing me in the right direction. THanks. Excell 2000
 

A:Excell - seperate contents of a cell

Read other 11 answers
RELEVANCY SCORE 88.4

Does any one know how to create a Formula or Function that would recognize whether the contents
of a cell are a hard coded value versus a formula ?
 

A:Excel Cell Contents Recognition

http://www.j-walk.com/ss/excel/tips/tip28.htm
 

Read other 2 answers
RELEVANCY SCORE 88.4

Excel 2007 users having an unusual problem of cell content temporarily disappearing. Content shows in formula bar, but not in cell unless the cell is highlighted or double clicked, then contents reappear. This is completely random with no discernable pattern except that it seems to happen most often when scrolling. I've found this same question in multiple places on the web, but no solutions. Any suggestions on cause and cure?
 

Read other answers
RELEVANCY SCORE 88.4

I can't edit the cell contents in ms office excell 2007.
please help.

A:I can't edit the cell contents in ms excell

Moving thread to the Office Forum for better results.
What does the formula say in the Formula Bar? If you Right click the Cell and choose Format Cells what is listed under the various categories (ex) Number, Currency etc. Is this only pertaining to this particular work book or is this in all work books?

Read other 1 answers
RELEVANCY SCORE 87.6

I have a spread sheet where I would like a message to pop up after I enter a value in cell G2 based on what the value of I2 is. like the following description:
In cell I2 I have "=(E2*F2*G2)/144" after I enter a value in cell G2 I want a message to come up if the value of I2/g2 is less than three and not equal to zero" Is this possible? If so could someone help me out with this?

thanx
 

A:validation based on another cell

This is the same as the challenge file but I added the code for this question
 

Read other 1 answers
RELEVANCY SCORE 87.6

I have a fairly simple task. From Row 17 to row 51 and Row 96 to 163 , I want to delete the row if cells P and Q are empty.

From row 57 to row 94 I want to delete the row if cells B, C, P, and Q are empty

I'm not sure what I'm doing wrong here.

Sub CleanUp()

Dim endrow As Long
Dim x As Integer

Set endrow = Sheets("Work Order").Range("A17").End(xlUp).Row

For x = endrow To 17 Step -1
If Sheets("Work Order").Range("P" & x) = "" And Sheets("Work Order").Range("Q" & x) = "" Then Sheets("Work Order").Rows(x).EntireRow.delete
End If
Next x

Rows("167:180").Select
Selection.delete shift:=x1Up
End Sub
Click to expand...

If you see something glaringly wrong or know a quicker way to do this, I would be very thankful.
 

A:VBA Deleting row based on cell value

Here's an example work sheet. If the code works right in the example, it would delete rows 4, 5, 9, and 10.

Code:
Dim endrow As Long
Dim x As Long

For x = endrow To 29 Step -1
If Sheets("Sheet1").Range("P" & x).Value = "" And Sheets("Sheet1").Range("Q" & x).Value = "" Then
Sheets("Sheet1").Rows(x).EntireRow.Delete
End If

Next x
Why won't it remove the rows?
 

Read other 2 answers
RELEVANCY SCORE 87.6

Hi

I have a lot of cells in a worksheet that I would like to edit. The cells have this type of data 08:59:39 AM and I would like to change it to '08:59. When I record a macro it changes all the cells to the same value although they have different values. Please could you assist me.

Thanks
 

A:Edit cell contents in excel 2003

Read other 8 answers
RELEVANCY SCORE 87.6

Hi,

I use two sheets to manage my client list in Excel 2007. One is my calling list where all my companies along with the point of contacts' names, numbers, email, postal addresses are listed. Another one is a strategy list (which I update on biweekly basis) where I have written the current strategy against each company.

What I want to do is to show the strategies I have updated in the 2nd sheet to appear in the comment of companies of the 1st sheet so I know how to handle the customer while I am making the call to him/her.
 

A:Get cell contents in the form of comment in another sheet

Read other 8 answers
RELEVANCY SCORE 87.6

Hiya,

I'm having to make a list of users that we have but I need to put in name and login for example

Matt Hobbs | Mhobbs

Is there a forumla that I can use to read Cell A1 (Matt Hobbs) to display Mhobbs? so read the first character of the first word, then read the whole of the second word within a cell? - I've got no idea if its possible or not.

Thanks,
Matt
 

A:Excel formula to read the contents of a cell

Hi Matt, try this formula in B1
Code:

=LEFT(A1,1) & RIGHT(A1,LEN(A1) - FIND(" ",A1,1))
 

Read other 3 answers
RELEVANCY SCORE 87.6

I have a 5x7 table in Excel 2016 with a named range "CellsToAlign" and I want to be able to automatically format the cells to align the contents LEFT or RIGHT dependendent upon the cell value being a Negative or Positive value ?
 

Read other answers
RELEVANCY SCORE 87.6

Hi, I need a formula (=if etc.) to add a leading "0" if the contents of a cell are only 4 character.

SOrry, never mind. I started this tread in error and need to figure out how to delete it.
 

Read other answers
RELEVANCY SCORE 87.6

I have an excel spreadsheet. I would like to copy the contents of the table to word but I do not want it to be in a table on the word document. Even hiding gridlines does not work because I still cannot maniputate information in the cells. Is there any way to make the table inactive?

For example:
With gridlines hidden it looks like

Blah Blah Blah Blah

and I want it to look like
blah
blah
blah blah

i could cut each cell but that would take forever because I have 6 columns
and 160 rows.
 

A:EXCEL to WORD copying cell contents

Read other 12 answers
RELEVANCY SCORE 86.8

I have an excel workbook with a "INPUT" WkSht, and a "ACTIVE" WkSht.
INPUT has a dropdown menu that looks up a list in ACTIVE, locates a desired value, and displays several cells contents in ACTIVE, - in the INPUT page.
This is working.

Question 1:
One cell in ACTIVE contains "comments" - how do I display the comments in the cell from ACTIVE, in a cell in INPUT - so I can look at all of them.

Question 2:
How do I update the contents of a cell in ACTIVE, at the same location that was selected from the dropdown.

I am a beginner - please help.

See present MACRO below...

Sub UpdateLogWorksheet()

Dim historyWks As Worksheet
Dim inputWks As Worksheet

Dim nextRow As Long
Dim oCol As Long

Dim myRng As Range
Dim myCopy As String
Dim myCopy2 As String
Dim myCell As Range

'cells to copy from Input sheet - some contain formulas
myCopy = "D5,D6,I18,D20,D19,D8,D10"
myCopy2 = "D5,D6,D7,D8,D9,D10"
Set inputWks = Worksheets("Input")
Set historyWks = Worksheets("Payments")

With historyWks
nextRow = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0).Row
End With

With inputWks
Set myRng = .Range(myCopy)

If Application.CountA(myRng) <> myRng.Cells.Count Then
MsgBox "Please fill in all the cells!"
Exit Sub
End If
End With

With historyWks
With .Cells(nextRow, "A")
.Value = Now
.NumberFormat = "mm/dd/yy"
End With
.Cells(nextRow, "B").Value = Application.UserNam... Read more

A:Excel Marco Dropdown Menu Cell Contents

please do not duplicate
As your other post is in the Business Applications forum
continue there
http://forums.techguy.org/business-applications/899510-excel-marco-dropdown-menu-cell.html

closing this post
 

Read other 1 answers
RELEVANCY SCORE 86.8

Ok so here is my problem: In excel 2003 i have a nice little spreadsheet. On screen and in the print preview everything looks perfect. But when i print it out, the numbers in the cells are overlapping across the grid lines. it doesnt look pretty and its not really very professional either. Does anyone have any ideas? if you need any more info let me know.

A:Excel printing cell contents into overlapping cells

Does it happen with every font?
Are you using the TrueType fonts - indicated by TT when you select a font on the screen?
Perhaps something in the Print Setup would help?
When you do Print Preview, try the Options button, at which point some print properties of the printer might get connected correctly.

That said, I have no such problem with 2003, but in 2000 almost every font was failing with the exception of one which I don't recall. It was at work for different HP printers.

Read other 2 answers
RELEVANCY SCORE 86.8

What formula do I use to return a cell reference instead of contents? For example if I have a list of 100 names in Column A and I'm looking for the value "horse" I'd like excel to tell me the value is in cell A42. What's the proper way to get this result?
 

A:Excel formula to return cell reference instead of contents

if the Cell you want to test is in B1
and then the lookup range is A1 to A450

If you put this into C1 - it will return the row - I have added the A as we know its column A

="A"&MATCH($B1,$A$1:$A$450,0)

i'm sure some of gurus will post a better solution
 

Read other 1 answers