![]() |
Fun newbie stuff
Howdy, boys and girls...
This is my first venture into VB programming in Excel, and I think i is safe to say i'm a novice at the whole VB programming dealy-o. That said, I have a program that should be a fairly straightforward translation t use in excel but I don't exactly know the best approach... that being Macro? VB? export to Access and do it there? Here is my desi I have a field in an excel spreadsheet that I need to check and chang the value of for each row, depending on the content in certain othe fields in that row. For example, here is the code I am trying t convert: IF PPO EQ 'R' THEN 'REV' ELSE IF PROCDATEA GE '200107' AND ADJCODE EQ '1' OR '3' AND CHARGES LT .00 THEN 'REV' ELSE IF PROCDATEA GE '200107' AND ADJCODE EQ '1' OR '3' AND CHARGES GE .00 THEN 'NEW' ELSE IF PROCDATEA GE '200107' AND ADJCODE EQ '4' AND CHARGES GE .00 THEN 'REV' ELSE IF PROCDATEA GE '200107' AND ADJCODE EQ '4' AND CHARGES LT .00 THEN 'NEW' ELSE IF PROCDATEA LT '200107' AND ADJCODE EQ '0' OR '3' AND CHARGES LT .00 THEN 'REV' ELSE IF PROCDATEA LT '200107' AND ADJCODE EQ '0' OR '3' AND CHARGES GE .00 THEN 'NEW' ELSE IF PROCDATEA LT '200107' AND ADJCODE EQ '1' AND CHARGES GE .00 THEN 'REV' ELSE IF PROCDATEA LT '200107' AND ADJCODE EQ '1' AND CHARGES LE .00 THEN 'NEW' ELSE IF CHARGES GE .00 THEN 'NEW' ELSE 'REV where "PROCDATEA", "ADJCODE", CHARGES" etc are all column headers. I would need this function to check every line in the spreadsheet... Should I translate this into a formula? A macro? hmmmmm? If a formula could you provide a gentle prodding in the correct formatting? thanks in advance for your suggestions.. -- Message posted from http://www.ExcelForum.com |
Fun newbie stuff
Figured out an approach different than this...
Thanks anyway -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 03:52 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com