ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cell = cell value AND format (https://www.excelbanter.com/excel-programming/276638-re-cell-%3D-cell-value-format.html)

steve

Cell = cell value AND format
 
Carrie,

Ah Yes! We all have those "senior moments". Even young-uns like you.

And You're Welcome!

--
sb
"Carrie" wrote in message
...
Steve & J.E.,

Thank you, I should have thought of it myself!

-----Original Message-----
one way:

Dim c As Range
Dim b As Range
For Each c In Range("Number")
For Each b In Range("Supplier")
If c.Value = b.Value Then
With c.Offset(0, -5)
b.Offset(0, -1).Copy .Cells
.Value = .Value
End With
End If
Next b
Next c




In article ,
"Carrie" wrote:

I would like to set a cell's value AND format based on
another cell's value & format.

The following code works fine to insert the appropriate
supplier name for each row. The problem is the

supplier
list is color coded to designate territory - I want

this
macro to insert the supplier name as it is formatted in
the Supplier list.

For Each c In Range("Number")
For Each b In Range("Supplier")
If c.Value = b.Value Then
c.Activate
ActiveCell.Offset(0, -5).Range("A1").Select
ActiveCell.Value = b.Offset(0, -1).Value
End If
Next b
Next c

THANK YOU!
Carrie

.





All times are GMT +1. The time now is 03:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com