LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bud Bud is offline
external usenet poster
 
Posts: 61
Default If Cell2.Value = "#N/A" Then formula not working

Hello

I have a worksheet titled Fill-Down. It populates data from another
worksheet matching on descroptions from yet another worksheet.
If the matching can not find a match there is a #N/A that is placed in the
column E field.

I want to go down this list(Column E) looking for the #N/A. If I find this I
want to check on the description of that row which is in the column to the
left. If that description matches what I have hard coded I want to populate
over that #N/A in columns E and fill in another set value in column F in the
same row but 1 column to the right.

I set some code in but it doesn't work. It stops right at If Cell2.Value =
"#N/A" Then
1. Can someone look at this and suggest a fix?

2. One other question.....Cell2.Offset(0, -1).Value is the description
column field as I can see the description when I test this. Beyond the
formula below I want another ELSE IF to recognize if PRJ exists in the 1st 3
characters of that offset and than if it does write out PRJ00000 and append
the 4th,5th,6th characters from cell2.offset(0,-1) into the current active
cell Cell2.Offset(0, 0).Value
How do I do this?

Sheets("Fill-Down").Select
Cells.Select
Columns("e:e").Select
Dim Cell2 As Range

For Each Cell2 In Selection
If Cell2.Value = "#N/A" Then
If Cell2.Offset(0, -1).Value = "General Admin - LA" Then
Cell2.Offset(0, 0).Value = "0"
Cell2.Offset(0, 1).Value = "AD"
End If
Else
If Cell2.Offset(0, -1).Value = "Catalog - Help Desk Support" Then
Cell2.Offset(0, 0).Value = "PRJ00000513"
Cell2.Offset(0, 1).Value = "HD"
End If
End If
Next Cell2
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"if" formula not working- seems to be formatting GaiGauci Excel Discussion (Misc queries) 4 November 11th 09 03:27 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Replace(ActiveCell.Formula, "Round(","") not working as expected Dennis Excel Programming 3 May 16th 07 04:49 PM
If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ... Maria J-son[_2_] Excel Programming 2 March 5th 06 12:20 PM
Working out age from "Day" "Month" "Year" timmyc Excel Worksheet Functions 4 February 5th 06 03:07 PM


All times are GMT +1. The time now is 12:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"