LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Please help! Macro to change cell contents based on cell to the left

Hello - I've got a huge calendar of bookings and the hours are all
messed up from our database! I've got to manually fix several hundred
cells, basically changing most of them from "40" to "55", or "32" to
"44", "24" to "33", and a few others. I have Excel 2000.

I'd like to write a macro and I have a very small start. Any advice or
code would be unbelievably appreciated. Ideally I'd like to select
specific columns of cells and then run this macro pseudocode on them:

------------------------------
For each *selected* cell:
Does the cell directly to my left contain(":")?
If Yes --
Does my cell contain("40")?
If Yes --
Change my cell to ("55")
Does my cell contain("32")?
If Yes --
Change my cell to ("44")
Does my cell contain("24")?
If Yes --
Change my cell to "(33")
Does my cell contain("16")?
If Yes --
Change my cell to ("22")
Does my cell contain("8")?
If Yes --
Change my cell to ("11")
Otherwise... do nothing
If No --
do nothing

---------------------------------------------

thank you, thank you, thank you.
Jennifer.
 
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
How do I change contents of a cell based on drop down list selecte yateswdy Excel Worksheet Functions 2 October 21st 09 03:18 AM
how to change color of cell based on contents of cell robert wake Excel Discussion (Misc queries) 3 February 24th 09 08:04 PM
How to change cell contents based on date? tgcali Excel Discussion (Misc queries) 3 November 17th 08 08:06 PM
macro with input msg based on cell contents Janelle S[_2_] Excel Discussion (Misc queries) 2 February 9th 08 11:47 PM
Change cell color based on contents bre Excel Discussion (Misc queries) 2 November 10th 05 12:39 AM


All times are GMT +1. The time now is 04: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"