Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Add formula for multiple recurrence to VB Code

Add formula for multiple recurrence to VB Code

Scheduled Pinned Locked Moved Visual Basic
collaborationhelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    manju 3
    wrote on last edited by
    #1

    Hi Team, I have 3 columns A,C and F. Based on A and C, i am writing the formula for adding F cells together in the Output cell. I have the formula written for output column as

    =IF($A1=0,F1,
    IF($A1=1,IF(C1=4,F1 &CHAR(10)& F2 &CHAR(10)& F3 &CHAR(10)& F4,
    IF(C1=3,F1 &CHAR(10)& F2 &CHAR(10)& F3,
    IF(C1=2,F1 &CHAR(10)& F2,""))),""))

    Its working fine as below:

    A C F output
    0 1 a a
    1 2 b bc
    2 2 c
    1 3 d def
    2 3 e
    3 3 f

    Can someone help me how can i add the formula in loop to check for C1>4 like and go on for if more values :

    IF($A1=1,IF(C1=5,F1 &CHAR(10)& F2 &CHAR(10)& F3 &CHAR(10)& F4 &CHAR(10)& F5,
    IF($A1=1,IF(C1=6,F1 &CHAR(10)& F2 &CHAR(10)& F3 &CHAR(10)& F4 &CHAR(10)& F5 &CHAR(10)& F6,
    IF($A1=1,IF(C1=7,F1 &CHAR(10)& F2 &CHAR(10)& F3 &CHAR(10)& F4 &CHAR(10)& F5 &CHAR(10)& F6 &CHAR(10)& F7,

    Great thanks Manju

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups