#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Formulas

I am trying to create a formula that would perform the following task.
Compare the value in B3 to the value in B2
If identical then:
Copy the word DUP into cell C2 and then move the information from cells D3
thru G3 to cells D2 thru G2

If not identical then perform no action and move onto the next cell
comparison.
--
Thank you, Rich
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,355
Default Formulas

This is something you'd have to do through VBA rather than functions. Is
that what you want?

"rnello" wrote:

I am trying to create a formula that would perform the following task.
Compare the value in B3 to the value in B2
If identical then:
Copy the word DUP into cell C2 and then move the information from cells D3
thru G3 to cells D2 thru G2

If not identical then perform no action and move onto the next cell
comparison.
--
Thank you, Rich

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Formulas

Formulae only return values to their calling cells, they can't "put"
values in other cells.

You could use a macro:

Public Sub MoveDuplicateInfo()
Dim rCell As Range
For Each rCell In Range(Cells(2, 2), _
Cells(Rows.Count, 2).End(xlUp).Offset(-1, 0))
With rCell
If .Value = .Offset(1, 0).Value Then
.Offset(0, 1).Value = "DUP"
.Offset(0, 2).Resize(1, 4).Value = -
.Offset(1, 2).Resize(1, 4).Value
End If
End With
Next rCell
End Sub
In article ,
rnello wrote:

I am trying to create a formula that would perform the following task.
Compare the value in B3 to the value in B2
If identical then:
Copy the word DUP into cell C2 and then move the information from cells D3
thru G3 to cells D2 thru G2

If not identical then perform no action and move onto the next cell
comparison.

Reply
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
CELLS NOT CALC FORMULAS - VALUES STAY SME FORMULAS CORRECT?? HELP Sherberg Excel Worksheet Functions 4 September 11th 07 01:34 AM
automatically copy formulas down columns or copy formulas all the HowlingBlue Excel Worksheet Functions 1 March 16th 07 11:11 PM
Formulas not evaluated, Formulas treated as strings Bob Sullentrup Excel Discussion (Misc queries) 0 November 27th 06 08:01 PM
formulas for changing formulas? creativeops Excel Discussion (Misc queries) 4 January 26th 06 03:07 AM
Formulas AllenCountyJones Excel Worksheet Functions 1 March 30th 05 07:01 PM


All times are GMT +1. The time now is 11:16 AM.

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"