Over 1 million tech questions and answers.

Multiple IF Statement based on first 3 characters of cell

Q: Multiple IF Statement based on first 3 characters of cell

Hello,

I am using Excel 2010 and trying to resolve an if statement... in the file attached I require the following:

I need 1 of 3 results for cell G2 based on the first 3 characters of cell B2

M15### would equal PAB
M22### would equal NSY
Non# would equal None

Thanks

RELEVANCY SCORE 200
Preferred Solution: Multiple IF Statement based on first 3 characters of 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: Multiple IF Statement based on first 3 characters of cell

This was my attempt but not working:

=IF(LEFT(B2,3)="M15","PAB",if(LEFT(B2,3)="M22","NSY",if(B2,3)="Non","None")))

Read other 2 answers
RELEVANCY SCORE 76.8

Hey all,

I'm new and have no experience with Excel vba coding. Hopefully someone here can help me out.

My excel sheet keeps a list of Email addresses on column B (with duplicate email addresses), and their particulars from column C (Item price, purchase date, etc) onwards.

I need the vba to email multiple recipients (those with the "notification" field marked as yes) with their purchasing details in it. It should also prevent multiple emails to the same email address.

Thanks in advance,
Leon

PS.
Using Excel/Outlook 2010
 

A:Emailing multiple recipients from Excel Based off Cell Value

Read other 9 answers
RELEVANCY SCORE 76

So first of all let me thank everyone that had input on my last post....i certianly appreciate the help.
so heres what i got going now. i have formatted the class rosters that will be used and i have a master data base of numbers that automatically updates each time a new class is added. and while some ppl think its great others are like well why cant it automatcally populate a list of everyone who failed, got dropped, or didnt show up. so thats what i need to do. i need some vba help on this one ( i actually got them to let me use macros now). i have the class rosters set up to where if a student does not show up then the row get highlited red and yellow if they get dropped, and i will need to add another color like blue for fail. anyways, the workbook is built like this: there is an annual training sheet ( total of all monthly numbers), then 12 monthly training sheets, and 52 weekly training sheets and then an unknown number of daily class rosters. looks something like this:

/ANNUAL//JAN 2011//3-7 JAN//CLASS 1//CLASS2//CLASS 3//CLASS 4//10-14 JAN//CLASS 1//CLASS2//CLASS 3//CLASS 4//17-21 JAN//CLASS 1//CLASS2//CLASS 3//CLASS 4//24-28 JAN//CLASS 1//CLASS2//CLASS 3//CLASS 4//FEB 2011/......ECT.

ok so what i need to do since the tabs that say "class 1, class 2" and so on will actually have their own unique name depending on the date, type of class and location it was taught. is to be able to have a vba macro (that i will use on each weekly tab and just change the fi... Read more

A:need to search multiple sheets and copy based on cell color

If it's a macro, you can test if .font.color = vbred then .... if .font.color = vbgreen ... etc.

If other then you would have to list the color value or colr index as a variable and test on that.
 

Read other 3 answers
RELEVANCY SCORE 75.2

Good Afternoon - this is a follow-up to an earlier post that has been closed.

http://forums.techguy.org/business-applications/1090938-emailing-multiple-recipients-excel-based.html

I would like to do something similar.

My Excel sheet has a list of Email addresses in Column A (with duplicate email addresses).
I have several other columns with data that that I would like to have appear in the body of the email in Outlook.

I need to collate each row with the same email address so ONLY 1 email is sent to each recipient.

Is this something easy to do?
I have little to no VBA coding skills

Attached is an Excel mockup of what I am attempting to accomplish.

The 1st tab called "Sample Data" is basically the raw data I want to leverage.
(which I also tried to display below)
Email Address .....Invoice Number .....Date..... .....Dollars
​ [email protected] .............1 ...............7/3/2013 ......$10,000
​ [email protected] ..............2 ...............7/9/2013...... $50,000

[email protected] ..........3 ...............7/9/2013 ......$40,000

[email protected] ............4 ...............7/10/2013 .....$1,000

[email protected] ............5 ...............7/11/2013 .....$3,000
​The 2nd tab called "Body of Email" is an example around how I would like to see the data appear in the email.
Even though [email protected] appears 3 times in the above example, I ONLY want him to receive 1 email that contains 3... Read more

A:Emailing multiple recipients from Excel Based off Cell Value Collate to one email

Read other 8 answers
RELEVANCY SCORE 75.2

Hi This is a follow up to

http://forums.techguy.org/business-...emailing-multiple-recipients-excel-based.html

I would like to be able to do the same

My excel sheet keeps a list of Email addresses on column B (with duplicate email addresses), and their particulars from column C (Item price, purchase date, etc) onwards.

I need the vba to email multiple recipients (those with the "notification" column E field marked as yes) with their purchasing details in it. I need to collate each row with the same email address & marked Yes so that only one email is sent.

eg: email will have in the body

Your order are ready to collect:

row 2 information
row 5 information
row 9 information
It should also prevent multiple emails to the same email address. I would like not to have to change the Notification column to acheve this.

Thank you for your help.
 

A:Emailing multiple recipients from Excel Based off Cell Value Collate to one email

Read other 6 answers
RELEVANCY SCORE 68.4

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 68.4

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 68.4

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 67.6

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


 

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 64.4

Hi There

I've tried many ways to do this but I always get an error. Here is my code.

Sub Testing()
Sheets("Sheet1").Select
Range("A1").Select
If Range("A1").protect = True then
Exit Sub
Else
More code goes here
End If
End Sub

Line 3 is giving me errors. Here is what I want to do with line 3. If Range("A1") is protected then Exit Sub else continue with running the code.

Any help would be appreciated.

Mario
 

A:Solved: Protected cell with If then statement

Read other 16 answers
RELEVANCY SCORE 62.8

In Excel, can I use an IF statement to change the background color of a cell?
 

A:Solved: Excel cell color change using an IF statement

Read other 16 answers
RELEVANCY SCORE 62.4

I used to be able to write a logical statement such that if teh result was negative , the answer was given as RED font. But I've forgotten how to do it ! Can anybody help ?

For example , if the application was "If the result of A4 minus A8 is negative , how do I make the font change colour to RED in the cell containing the Logical statement ?"
 

A:Change font colour as a result of condtional statement in a cell

well you can just use format to turn negative numbers to red

This link shows format and also using conditional formatting as well

http://www.timeatlas.com/5_minute_tips/general/how_to_use_conditional_formatting_to_highlight_data
 

Read other 3 answers
RELEVANCY SCORE 61.2

Hello

Can anyone tell me if there is a limit on the number of characters that can be entered into a cell in an excel spreadsheet????
 

A:Max Characters in a Cell

Length of cell contents (text) 32,767 characters. Only 1,024 display in a cell; all 32,767 display in the formula bar.
 

Read other 1 answers
RELEVANCY SCORE 60.4

This is pretty dumb but I am trying delete the first five characters in a cell. The cell contains a social security number but I only want the last four. I am using excel. I tried writing a simple macro but could not get it to work. I need it to work for the entire column. Please help.
 

A:Deleting first five characters in a cell

Hi,

Not sure how applicable this would be, but it will delete the first 5 characters in column A ...
Code:
Option Explicit
Sub del5Left()
Dim cel As Range, _
rng As Range
Set rng = Range("A1:A" & Range("A65536").End(xlUp).row)
For Each cel In rng
cel.Value = Right(cel.Value, Len(cel.Value) - 5)
Next cel
End Sub
Is that what you're looking for?
 

Read other 3 answers
RELEVANCY SCORE 59.2

IIRC in XP there used to be such a function (?LEN?), but so far I have not found its equivalent in Win7 .

Hopefully someone can assist.

A:Function to return number of characters in cell?

Presumably you mean in Excel? If so, the LEN function still returns the number of characters in a text string, under Windows 7

Read other 2 answers
RELEVANCY SCORE 58.4

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 58.4

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 58.4

Hi

I've volunteered to sort some data for someone as part of a project I'm doing. The problem is I'm not too sure how to properly write/use macros for Excel 2007.

The point of the data sorting is to eventually clean up a dataset so that I have the start of an address i.e. 1 North Street City.

I've got a dataset of thousands of values made up of parts of addresses. Some of the data have postcodes already and I want to extract these postcodes as a starting point to clean it up. I'd like to extract them and save them in a separate cell.

So I was wondering if anyone could help?

Say for example I had this data in A1

1 North Street B22 2BC

Is there a way to write a macro that will select any combination of three characters a space and three characters, whether that would be at the start, middle or end of a cell? And then put this data into a neighbouring cell?

If anyone could help I would really appreciate it!

Thanks

Catherine
 

A:Can I search and extract characters from within a cell if they fit a specific pattern

Read other 8 answers
RELEVANCY SCORE 58

Hi All

Just wondering if anyone is able to help me with the code required to extract the left most characters in a text cell, up to and not including the instance of the 1st comma. Some data doesn't have a comma in the record, others (most) do.

Examples are:

Example 1
LINCOLN, NE 68501

... and the resulting data I want to extract would be

LINCOLN

Example 2
One Ingram Blvd

... resulting data should remain intact

Is there an easy formula that will allow me to do this folks please? Thanks in advance, am up against it here.

John
 

A:Solved: Excel: extracting left characters up to the 1st comma in a cell

Open the attachment, and save it, so that you can have a practice on this data, before you attempt doing it on your own.

Select cells A1 to A8
Select the menu choice Data
Select the menu choice Text to Columns

A dialgue box will open

Select the option Delimited and click on Next

In the step 2 of 3 dialogue box, make sure that the only option ticked is the Comma box and then click on Next

In the step 3 of 3 dialogue box,you will notice that Excel has already split the data into 2 columns (in the Data preview area).

The first column is highlighted
Click on the second column so that is highlighted and then select the option "Do not import column (skip)"
Notice that the heading changes to Skip column.

You can do one of the following at this point.

The first is to have Excel place the first column that has been split into cells A1 to A8, so that you are only left with the data you need.
If this is what you want, just click on Finish. You will only have the data you want in column A

The second option, is to tell excel to place the data into another column and leave column A intact. If this is wjhat you want, then where it says Destination, change the cell reference to say $D$1. You then click on Finish and the data that you want is placed in column D, with the original data in column A left intact.

Hope that helps. If there is anything you do not understand, get back and let me know, and I will explain further.
 

Read other 3 answers
RELEVANCY SCORE 58

Hello,
i do call data analysis in excel 2007 involving more than 1 lac call record.

i need to exctract certain text (eg.Oracle) before a word (eg. install,repair,reload,reinstall) and even after these word if any.

maybe 10 characters before and after the word "PLEASE INSTALL ORACLE"

as in call records we have fields as Problem/Issue raised and Resolved.

Please help..!!!
 

A:Excel 2007 - Extracting Characters before & after a specific word from a Cell

Hi, welcome to the fourm.

I suggest you write a macro.

In this macro you search for the position you word starts:

You use the Instr() function

Dim pos as integer
pos = instr(1,<your full text string>,<you word>)

"This is your text string and you need to know where the word is"

so

pos = instr("This is your text string and you need to know where the word is","text")

pos will return the value 14, the beginning position of the word "text"
try this in Excel as macro
Code:

Sub test()
MsgBox InStr(1, "This is your text string and you need to know where the word is", "text")
End Sub

After you have the pos value then you can work with the different string functions to extract or create your desired text
 

Read other 3 answers
RELEVANCY SCORE 57.6

Hello everyone.

I am trying to tweak a macro that was posted on this forum some time back, but I'm a bit of a N00B. The macro is from this thread that is now locked: https://forums.techguy.org/threads/...ue-date-reminder-based-on-excel-file.1129238/. What I am looking to do is generate two different emails whenever the value of a cell changes. All the data that needs to be part of the email is included in various cells. I've included sample data. If possible, could you provide code for generating the email and another for sending the email without opening Outlook (i.e., as soon as the value changes)? I've included sample data for your consideration. Thanks in advance for any help you can provide.

When Cell Value = In Progress
The email I'm hoping to generate (I've mapped it with the cell contents I'm hoping to pull) will be as follows when Column F changes to In Progress. The email addresses are in Column G.

Subject Line: "Web Request(s) Now In Progress"

Dear D2,

Your C2 B2 request has been received and is now in progress. Thank you!

My Signature

When Cell Value = Completed
The email I'm hoping to generate (I've mapped it with the cell contents I'm hoping to pull) will be as follows when Column F changes to Completed. The email addresses are in Column G.

Subject Line: "Web Request(s) Completed"

Dear D2,

Your C2 B2 request is complete and the changes are now live. Thank you!

My Signature
 

Read other answers
RELEVANCY SCORE 57.6

Hello,

I'm trying to enter a formula that returns a value when a loan balance is paid off. I've attached a spreadsheet that shows the costs and revenues of a project and the corresponding loan balance. It's very basic, but I'm trying to see if there is any formula that will return the Month that corresponds to the loan being paid off. I've been trying to use an "if" formula and when the loan balance is <0, but i don't know how to do it with just one cell. Let me know if anyone has ever done anything like this.

Thanks,
Chet
 

Read other answers
RELEVANCY SCORE 57.2

Hi, I am new here.

Have to create database based from data stored in xlsx file. Converting to CSV, and than importing to database would be an nice solutione, but the problem is a little bit difficult.
The text in the xlsx file is stored in 1 column, while there is 409 rows.

Looks like this:
I have to separate, and copy parts of the each row, based on specific characters.

Will explain on the folowing text(this is in column A)
(BAB) STOFFOVÁ, V. et. al. : Informatika, informa&#269;né technológie a*výpo&#269;tová technika : Terminologický a*výkladov slovník. 1. vyd. Nitra : Fakulta prírodných vied UKF v*Nitre, 2001. 230 s. ISBN 80-8050-450-4

1. '(BAB)' should go to Column B. So select text till first ')' character, and copy to B, in same row.
2. 'STOFFOVÁ, V. et. al.' goes to column C. spec. char. here is ':'
3. 'Informatika, informa&#269;né technológie a*výpo&#269;tová technika : Terminologický a*výkladov slovník.' This goes till first dot.
4. The rest of the text.

I am pretty sure in that there is some nice and smart solution for this, but I cant manage it.
Any help would be highly appreciated.

Thank You in advance!
red
 

A:Solved: Copy/paste text in excel based specific characters

Read other 16 answers
RELEVANCY SCORE 57.2

Trying to pull the word "set" from a cell that has more words and characters than just "set. I also need it to account for variables such as lower case/upper case (i.e. SET, SeT, SEt, seT). The formula needs to pull the word "set", however it looks, into the adjacent cell, this way I can use the Sort tool to organize all cells.

I tried the INDEX formula, but it only looks for the word "set" without distinguishing it from the other characters.

I don't think the LEFT/RIGHT/MID functions will work, as the character count is going to be a variable from each cell (my judgment on these formulas is really shallow due to my lack of time to completely understand them).

Take a look at the attached spreadsheet and you'll see where I'm going.

Thanks in advance
 

A:Solved: Excel 2007 - Formula for Extracting Specific Characters from Cell

Read other 9 answers
RELEVANCY SCORE 57.2

i have 2 workbooks entitled [price] and [fruit] respectively

[price], sheet1!, cell A1 is a variable which can contains a cell address, eg $D$1

[fruit], sheet1!, contains information in cells as follows:
D1 = apples
D2 = bananas
D3 = cherries

in the [price] workbook, i want to have a formula in say, cell B1, which would use the cell reference in A1 to find the value in the [fruit] workbook.

so, if [price]sheet1!A1 = $D$1

then [price]sheet1!B1 = apples

note that the result "apples" was pulled from another workbook, [fruit]sheet1!$D$1.

if [price]sheet1!A1 = $D$2,
then B2 = bananas

and so on...
in the [price] workbook,

As A1 is a variable, i do not want to physically retype the value within A1, but rather draw reference to it inside of a formula. i hope this is clear as mud.

Is this possible?

Thanks,
markus
 

A:Q: draw value from a 2nd workbook, based on a variable cell ref in 1st wb

In Sheet1!B1 (of Price), use

=INDIRECT("[Fruit.xls]Sheet1!"&A1)

, where A1 contains the cell reference -- $D$1, $D$2, $D$whatever.

As explained yesterday, this (the INDIRECT function) will only work when both files are open ; to get it to work when the source file if closed, you need to download Laurent's add-in. Please do not start threads over.

Rgds,
Andy
 

Read other 1 answers
RELEVANCY SCORE 57.2

Is there a way to insert a new worksheet based on whether or not a cell contains data and name that worksheet with the contents of the cell.
Ex: A1= Data
worksheet would be added and named Data
 

A:Insert Worksheet based on cell content

Read other 9 answers
RELEVANCY SCORE 57.2

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 57.2

I have a worksheet that contains a budget, some of the line items are identified as allowances in column C, by the "allow" designation. The description of the allowance is in column B.

I want to create an automatic table on a worksheet called "Allowances" which searches column C for "allow", and if found returns the description from column B in cell A and the amount of the allowance from column F, in cell B.

Any suggestions?

Thanks,
 

Read other answers
RELEVANCY SCORE 57.2

Hi all,

I have a workbook containing 30 worksheets. The first sheet is named Master, while the other 29 worksheets are named with cities where we held branch offices (Los Angeles, New York, Chicago, Washington D.C., etc.)

I am trying to write a macro that will copy the contents of a row in the Master sheet to a particular worksheet based on the contents of the cell in that row that contain the location.

To illustrate:
Master sheet:
Columns are: Staff Name, Location, Project status

We have over 5000 staff.
I am trying to write a macro that will copy each staff's record to the worksheet corresponding to his/her location, depending on their project status.

So I am planning to use macro buttons labelled A, B or C (these are the values in the Project status column). So when I click on the button labelled A, the macro will go through all 5000 employees, and for those employees whole project status is "A", will copy that employee's record into a worksheet depending on his/her location.

For example:
Staff name, Location, Project Status
Joe Doe, Los Angeles, A
Jane Davis, New York, A
Mike Smith, Los Angeles, C

When I click on the macro for "A", it should copy Joe Doe's record into the worksheet labelled Los Angeles and copy Jane Davis' record into the worksheet labelled New York.

Thank you so much for your help. I've been searching all over the place for the command to use to reference the worksheet.
 

A:Excel - how to reference a worksheet based on value of a cell

For the love of PacMan, make sure you save your file BEFORE you try this. Try it on a copy of the file, even.

HTH,
Andy

Sub A_Status()
'select the list of staff names on Master sheet, then run
For Each Cell In Selection
If Cell.Offset(0, 2).Value = "A" Then
DestinationSheet = Cell.Offset(0, 1)
Cell.Resize(1, 3).Copy
Sheets(DestinationSheet).Select
'assumes each location sheet has a header row
Range("A65536").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
Sheets("Master").Select
End If
Next Cell
Application.CutCopyMode = xlCopy
End Sub
 

Read other 2 answers
RELEVANCY SCORE 57.2

What is the best way to change cell colors based on a cell color (Not a number)?

I have a condition where a cell may have green background (conditional formatting), and on the next update, a different cell may have the green background (same condition, but not the same cell). I would like several cells in that column to change to the same color when this happens, they will be different rows, but will be on the same row as the change occurs ... it is dynamic.
*********
Condition 1:

G8 background color is = green

Change adjoining cells to the right and down to the same color
(H8:K8 and G9:K12) The inclusive range would be (G8:K12)
********
Condition 2 on update:

G8 is back to normal but H8 is now green

Cells in column G are back to normal but adjoing cells to the right and down should now be green.
(I8:K8 and H9:K12) The inclusive range would be H8:K12)
*******
Here is an example of the conditions above.

Condition 1
Row G H I J K
8 20 22 33 32 35
9
10 24% 15% 22% 21% 25%
11 80 82 90 88 89
12 44% 45% 48% 47% 50%

Condition 2
Row
8 22 33 32 35 38
9
10 15% 22% 21% 25% 27%
11 82 90 88 89 90
12 45% 48% 47% 50% 52%

The cells I want to highlight will not be of the same value and there are formulae in every cell.

Thanks
I haven't got the hang of copying the cells from Excel to the post. sorry about the formatting.
 

A:Change Range Cell Color Based on Another

In (nearly) simplest terms, and assuming from what you say that there'll NEVER be a time when G8 AND H8 are BOTH green, then

If Range("G8").Interior.ColorIndex = 10 Then
Range("G8:K12").Interior.ColorIndex = 10
ElseIf Range("H8").Interior.ColorIndex = 10 Then
Range("H8:K12").Interior.ColorIndex = 10
End If

You'll have to get back to us on what sheet event might fire this. & let us know if the actual cond formatting (a) blocks the code and/or (b) remains intact.

Rgds,
Andy
 

Read other 3 answers
RELEVANCY SCORE 57.2

Hi,
I am trying to hide rows in excel 2010 based on cell values in a certain column. I know that I have to use the VBA but I don't know how to do that kind of stuff. I know it should be simple to do but I don't know where to start. Let me know what you need in order to help me accomplish this task.
 

A:How to hide rows in excell based on cell value

Read other 8 answers
RELEVANCY SCORE 57.2

I have a sheet with several hundred rows. Starting in Row 4 through the end of the sheet are mixed dates in column 1 and ALL rows from Row 4 through the end of the sheet hidden. I want to be able to type in a date in Cell A1 and have all rows that have that date in Column 1, Row 4 through the end of the sheet to become unhidden. Secondly, I would like to type some other code like "999" or something in Cell A1 to have ALL rows become unhidden. Thirdly, I would like to either type another code or just delete anything in Cell A1 and have ALL rows from Row 4 through the end of the sheet to become hidden again.
Tech Support Guy System Info Utility version 1.0.0.4
OS Version: Microsoft Windows 7 Professional, Service Pack 1, 64 bit
Processor: Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20GHz, Intel64 Family 6 Model 23 Stepping 10
Processor Count: 2
RAM: 3963 Mb
Graphics Card: Mobile Intel(R) 4 Series Express Chipset Family, 1853 Mb
Hard Drives: C: 453 GB (298 GB Free); F: 931 GB (710 GB Free);
Motherboard: TOSHIBA, Portable PC
Antivirus: Webroot SecureAnywhere, Enabled and Updated
 

Read other answers
RELEVANCY SCORE 57.2

 The laptop immediately shuts off when I pull out the power connector.  I've tried the troubleshooting steps listed on HPs website with no change. Thanks.

Read other answers
RELEVANCY SCORE 57.2

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 57.2

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 57.2

Dear Fellows

I am looking for help for a macro which can copy data to other sheet based on adjacent cell value which i define.

For example i have data attached in a sheet.

i want to copy data based on value present in E column to different sheets. if it is ES then all ES rows should be copied to sheet ES with roll number name father per and dept.

Same is for other departments, on different sheets. There will be 9 departments overall.

Looking for response
 

Read other answers
RELEVANCY SCORE 57.2

I have an Excel workbook with 400k rows Each set of rows contains a table name with the fields in the table. The number of fields is not the same for each table. For example:

COLUMN A COLUMNB

AV_ACTN_RSLT_VWACTN_RSLT_CDAV_ACTN_RSLT_VWDESCRAV_ACTN_RSLT_VWDESCRSHORTAV_ACTN_RSP_VWEMPLIDAV_ACTN_RSP_VWEXT_ORG_IDAV_ACTN_RSP_VWINSTITUTIONAV_ACTN_RSP_VWNAMEAV_ACTN_RSP_VWRSPL_ID

AMT_X_SAL_TYPEWCS_PLAN_DESCR20AMT_X_SAL_TYPEWCS_TOT_AMOUNT

I need to convert the field names so that they are in a row like this:

AMT_X_SAL_TYPEWCS_PLAN_DESCR20WCS_TOT_AMOUNT

Is there any way for me to do this programatically? I'm using the transpose feature but it is time consuming and I have 400k rows. So basically, I want something like if the field in column A row 1 matches row 2, move that field to the right of row 1 and so on until the table name changes.

Or maybe i should dump the spreadsheet in access and try there...

Thanks,

Amy
 

A:Move data from column to row based on value of cell?

Read other 6 answers
RELEVANCY SCORE 57.2

You must be bored with this question cos I've seen lots of them, however I can't seem to fathom out what to do..........

I've got a block of data within a spreadsheet 4 rows always in the same place.

How do I put into code:-

If column d43:e46 is blank delete rows 43 - 46 if not ignore it.

As I said I've tried a few things and it will delete the four rows regardless of them being empty of not.

Can someone help please.

Many thanks,

Moll
 

A:Deleting rows based on empty cell.

Is there anybody there? - Help!
 

Read other 2 answers
RELEVANCY SCORE 57.2

Sounds like a simple thing but I’m having troubles finding an easy answer. Still searching ….

I want to create a catalogue for a customer of mine (basic – but might be more extensive later)

– showing a thumbnail picture and then a short product description. Then he can go into the doc and correct the descriptions etc.

Not sure if excel or word or other is the best place.

He has over 200 product pictures stored on disks and folders on hard drive. I have corresponding description in excel based on a code that is the photo name (+.jpg).

So, I have the product files name as HB1000.jpg and all I want to do is show the picture (say at size 100x100)

Ideally I’d like to build a reference based on the code and not have to insert each file.

Thoughts??

So far – tried creating a formula/reference in excel with “Code” HB1000 (Cell A2) and image cell contains “=c:\productimage\”$A2$”.jpg” - can not get the pic to display
 

A:How to display images in Excel based on cell ref

The answer is already on here, I posted it fairly recently, it requires VBA to do it well.
see this thread
http://forums.techguy.org/business-applications/723855-solved-insert-image-based-cell.html
 

Read other 2 answers
RELEVANCY SCORE 57.2

Hi,

New here. I dug up a thread that Zack Barresse solved many years ago. I am looking to do the exact same thing. The link to the thread is below. My file is infinitely more complicated than what that user was asking for so I need a bit more help tuning the VBA. Link: http://forums.techguy.org/business-applications/710581-automatic-email-alerts-using-excel.html

Some specifics:

- I am using Outlook not Express
- Excel 2007
- All the functionality is complete for monitoring several live streams of securities data with several trade indicators.
- It is consolidated onto one sheet for manual monitoring (Picture below). Basically takes copious amounts of data and reduces it to just IF and AND functionality for the triggers for easy use from all the other sheets.
- The workbook will be open and running/refreshing on its own 24/7 as it is now.

I am a busy guy, I just need the VBA to automatically email me remotely when any of the 7 currency pairs causes a trigger when I am on the go. I can log trades from an app on my phone.

One other hurdle would be that if say (Using percentages to keep it simple) that a trigger would be if something reached as high as 80% to send the notification email. But where the system refreshes every 60 seconds it shouldn't send another notification each time it remains at or above 80%. Just the once. It may remain there for hours and that is a lot of emails.


Thoughts? and many many thanks in advance.
 

A:Excel - Auto Email based on cell value

Read other 10 answers
RELEVANCY SCORE 56.4

Hy guys

2nd time i am posting stuff for help, and as i was helped before i will again look forward the response.

I have a file of excel, in which i am sending emails to different candidates of admission, with scan letter placed in the same folder by name.

I want to edit this code, which could select attachment based on Column A list adjacent to the email address

I am attaching the file also pasting the code

Sub Test1()
'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm
'Working in Office 2000-2013
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim SigString As String
Dim Signature As String
Dim cell As Range

Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")

On Error GoTo cleanup
For Each cell In Columns("B").Cells.SpecialCells(xlCellTypeConstants)
If cell.Value Like "?*@?*.?*" And _
LCase(Cells(cell.Row, "C").Value) = "yes" Then

Set OutMail = OutApp.CreateItem(0)

strbody = "We at Graduate School of Engineering Sciences and Information Technology are extremely pleased to know that you have selected Hamdard University as preferred choice for your graduate/post-graduate Studies. " & vbNewLine & vbNewLine & _
"Hamdard University is a pioneer Higher Education Institute (HEI) of Karachi producing Masters and PhDs in the fields of Engineering, Computer Sciences, Information Technology, Energy and Environment since 19... Read more

A:Attachment based on cell value in a excel email macro

anybody ???
 

Read other 2 answers
RELEVANCY SCORE 56.4

I have some excel knowledge but am not too proficient in VBA. I am looking to generate emails based on the any of the conditions I have specified below for column G "Current Approved to Date"

Conditions:
1. =AND(($G9<Today()),($I9=""))
2. =AND(((J9-G9>3)),($I9="Applied for Ext."))
3. =AND((J9>G9),($I9="Active"))

If any of these conditions are met I would like an email to be generated.
(SIMILAR VBA) https://forums.techguy.org/threads/solved-automatic-email-alerts-using-excel.710581/page-2
 

A:Excel Generate emails based on conditions of cell.

Read other 10 answers
RELEVANCY SCORE 56.4

Hey all

New here and new to VBA so I apologize if this is the incorrect place to ask this question or if I'm not including enough information.

Basically I have two forms, one form that is a cost est. form and another form is a proposal form (client sees this one). I have the proposal form pulling information over from the cost est. form. What I would like to do is on the proposal form if rows c13:c277 are blank (no data pulled from the cost est. sheet) they will hide. But when I add data (a number) into the cost est. form the proposal form pulls that and unhides that row.

I've tried all kinds of VBA code and none seem to do what I want. I can get the rows to hide but then not unhide. I don't have code to show because I have deleted it when it didn't work. Any help would be greatly appreciated.
 

Read other answers
RELEVANCY SCORE 56.4

Hi guys,
I need to write a macro that is connected to many buttons, one for each row in spreadsheet, ask for a value to subtract, error check and (if ok) subtract from a corresponding value in column P.

When the button on a left hand side is clicked:
a dialog button should pop-up prompting a user to input the number of pieces to subtract from the corresponding cell (row based on the row of the button, column P)
error check the input number (show error if the value is smaller than 0 or larger than the corresponding value) ... I can write the error check by myself, so no need to do this step
subtract the number from the corresponding cell (i.e. user clicked a button located in cell A9, input 9,24 pieces in a dialog box and there are 15,97 pieces in P9 => the pieces in P9 should change to 6,73)
Thank you for helping me out!
Hope, the description is not very confusing.

Michal
 

A:Excel VBA: Subtract from a corresponding cell based on button placement

Read other 9 answers
RELEVANCY SCORE 56.4

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 56.4

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